Uh, failed to loadVars error?

Non-platform specific questions.

Uh, failed to loadVars error?

Postby Hblade » Thu Feb 11, 2010 2:40 am

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 :(
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score

Re: Uh, failed to loadVars error?

Postby skydereign » Thu Feb 11, 2010 5:40 am

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.
Attachments
saveLoad.zip
(406.51 KiB) Downloaded 73 times
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: Uh, failed to loadVars error?

Postby Hblade » Thu Feb 11, 2010 1:49 pm

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
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest

cron