Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DLL Talk / Unity - Saving To LUA

Author
Message
Regen eratez
12
Years of Service
User Offline
Joined: 8th May 2007
Location:
Posted: 16th Jun 2009 14:35
Hello guys,

I am trying to save a integer value into my LUA file, this is my code:


My LUA file looks like this:


But it doesn't seem to save the new interger, why could this be?

Thank you
Coldfire
10
Years of Service
User Offline
Joined: 22nd Oct 2008
Location: Indiana
Posted: 17th Jun 2009 01:24
Its been a while since i've played with Unity, but I think that only changes the variable in memory... not in the file. I think you may actually have to output to a file using dbp file commands. i don't think Unity has a function that does that. I could be wrong though. Hope this helps.
Regen eratez
12
Years of Service
User Offline
Joined: 8th May 2007
Location:
Posted: 17th Jun 2009 01:47
Yea I read somewhere something about it only changes the memory and nothing to do with the file its self.

Thanks!
kaedroho
12
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 23rd Jun 2009 19:20
You could always make the program write the file yourself.


open a file to write and do this for all your variables:


write string FileNumber, variablename$+"="+str$(variablevalue)

New specs: Nvidia Geforce 9600GS 768MB, AMD Anthlon x64 X2 4000+ (2.6GHz Dual core), 3GB DDR2 800MHz RAM and a big hard drive.

Login to post a reply

Server time is: 2019-10-15 09:32:03
Your offset time is: 2019-10-15 09:32:03