ID:264662
Feb 20 2010, 10:06 am (Edited on Feb 20 2010, 11:05 am)
|
|
Fixed.
|
That's the whole runtime error, it only happens when I click the Load() command. |
In response to ZMD Productions
|
|
This has to do with how you're calling Load(). It's reaching the alert() line and the usr mob (default target of alert()) has no client.
|
In response to Garthor
|
|
Problem fixed, thank you both.
|
Other than that, I can't see any reason for a runtime error in Load(). I can see some things that are wrong, or bad, but I don't see anything that's actually an error.
edit: figure I'll just point these out anyway.
For one, it's probably a good idea to save the savefiles by ckey rather than key. This is mostly preference, but spaces in file paths can be problematic on some platforms.
Write() is not necessary to "write" to the savefile. Write() is a datum function which writes all necessary members of said datum to the savefile. If that's not why you put Write() there, I apologize. But I see no reason why you would put Write() there after manually saving all of the data you appear to be reading in Load() (you aren't calling Read()).
Why? Assuming your manual assignment of the x/y/z values actually works, there is no reason at all to attempt to move them to where they already are. And if it didn't work, those values aren't going to be the values you want them to be anyway.
This would be closer to what you want: