Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Tech Support (https://forums.graalonline.com/forums/forumdisplay.php?f=7)
-   -   player.loadvars(path) (https://forums.graalonline.com/forums/showthread.php?t=65208)

Warcaptain 04-05-2006 06:24 AM

player.loadvars(path)
 
does not work x_x

i am guessing for security purposes.. but this needs to be modified.
lets say this is a file..
[code=Contents of levels/file.txt]
clientr.var1=244
account=Boop
[/code]

and if i do player.loadvars("levels/file.txt") it should pretty much set player.clientr.var1 to 244 (setting the flag) but not do account (because thats a reserved variable)

but it should allow to create new or modify custom variables x_x

k fix this :(

thx

ApothiX 04-05-2006 02:22 PM

You have to do something like player.clientr.loadvars() I believe. I use this function in my mudlib, so I know it works.

Admins 04-05-2006 10:34 PM

Yes the player is a quite complex variable, that's why direct access is not possible, only some sub-variables can be changed. If it's really a problem then it could be modified (in the hope that it's not breaking other functionality).

Projectshifter 04-06-2006 01:27 AM

Quote:

Originally Posted by Stefan
Yes the player is a quite complex variable, that's why direct access is not possible, only some sub-variables can be changed. If it's really a problem then it could be modified (in the hope that it's not breaking other functionality).

It would be quite helpful. I know earlier, like when we were still testing the new engine I was doing player.loadvars() or player.clientr = objContainingVariables; and it would work, but when I tried this a couple months ago it didn't. It would be quite useful, otherwise you have to run a loop to set all of the strings and it kills a bit of efficiency.

Warcaptain 04-06-2006 08:12 AM

Well now I made it so it saves a seperate text file for the client and clientr variables. You can do

clientr.save/loadvars()

But I kind of fail to see how it would be too complicated.. I mean just not allow for the script to wrote over any variables that are read only already.. ie: player.account

but can modify player.gralat serverside but not clientside etc


All times are GMT +2. The time now is 09:24 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.