Page 1 of 1

Uh, failed to loadVars error?

PostPosted: Thu Feb 11, 2010 2:40 am
by Hblade
Hey what's up? Okay in my name input feature, it saves a text var...
saveVars("Example.ema", "saves");

Now, when I load those vars in another .dat file, (or another ged rather)
loadVars("Example.ema", "saves");

And put this script in a text actor
spritnf(text, "Hello %s", PlayerName);

It doesnt seem to display the players name at all. For some reason (though named the same), the string "PlayerName" is empty even after loading, someone help please :(

Re: Uh, failed to loadVars error?

PostPosted: Thu Feb 11, 2010 5:40 am
by skydereign
It is probably something in your setup, most likely loading/displaying of the text. Here is an example of it working, if you post your setup it would be easier to tell you what is wrong.

Re: Uh, failed to loadVars error?

PostPosted: Thu Feb 11, 2010 1:49 pm
by Hblade
Ahh thanks! :D it was my saving method :3

EDIT:
I still cant get it to work T.T I used this method:

(Name editor) -> KeyDown -> Return -> Script Editor
Code: Select all
saveVars("irr.sfl", NameInput.text);

Then in the other .ged file I put this in
TextActor -> Draw Actor -> Script Editor
Code: Select all
loadVars("irr.sfl", "saves");

But when I draw the text, it comes up like this:
"Hello, " thats it o.o it's still blank. I'll look at your demo again because I did rush through it :D

Edit 2:
Lol... Why did I put saveVars and NameInput.text? >.>

Edit 3:
It works! :D Thanks skydereign :3