![]() |
savelines
Having trouble with savelines and the only thing I found from forum search is one thread that didnt quite explain it (Although i tried to user similar style).
Anyways I am trying to write to a file on the server, and when it creates the file it creates it as an empty file, and later nothing is added either. I have tried it both clientside and serverside and the file created is 0kb I have done it from the onCreated and onActionserverside. Not so sure if this is a bug or If I am doing something wrong. NPC Code: |
That should work.
'write' may be predefined, that's the only reason I can think of for it not to work. You could also try sending player.chat directly, but I don't see why test would be predefined. :/ |
Changed the variable names and have also sent player.chat directly as you suggested, I still am getting a 0 on the filesize, and nothing is being written.
This is not only on the serverside but clientside as well. I also restarted my gserver and npcserver when i was testing this intially. |
It is possible that savelines only works with arrays.
|
Try loading the lines before you save them.
|
May be you use savestring()
savelines() is saving an array, you would need to add() something before. |
Quote:
Thanks |
| All times are GMT +2. The time now is 05:19 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.