Graal Forums  

Go Back   Graal Forums > Development Forums > Tech Support
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 04-05-2006, 06:24 AM
Warcaptain Warcaptain is offline
Banned
Warcaptain's Avatar
Join Date: Jun 2001
Location: Virginia, USA
Posts: 2,086
Warcaptain is on a distinguished road
Send a message via ICQ to Warcaptain Send a message via AIM to Warcaptain Send a message via Yahoo to Warcaptain
player.loadvars(path)

does not work

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

k fix this

thx
Reply With Quote
  #2  
Old 04-05-2006, 02:22 PM
ApothiX ApothiX is offline
Okiesmokie
Join Date: May 2004
Posts: 1,447
ApothiX is on a distinguished road
You have to do something like player.clientr.loadvars() I believe. I use this function in my mudlib, so I know it works.
__________________


[06:24:19] * Parts: Skyld (i=silent@unaffiliated/skyld) ("Perhaps Okiesmokie did not realise that I like the boys. ")
Reply With Quote
  #3  
Old 04-05-2006, 10:34 PM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
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).
Reply With Quote
  #4  
Old 04-06-2006, 01:27 AM
Projectshifter Projectshifter is offline
The David
Projectshifter's Avatar
Join Date: Apr 2002
Location: USA
Posts: 912
Projectshifter is an unknown quantity at this point
Send a message via ICQ to Projectshifter Send a message via AIM to Projectshifter Send a message via MSN to Projectshifter Send a message via Yahoo to Projectshifter
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.
__________________
Who has time for life these days?
Reply With Quote
  #5  
Old 04-06-2006, 08:12 AM
Warcaptain Warcaptain is offline
Banned
Warcaptain's Avatar
Join Date: Jun 2001
Location: Virginia, USA
Posts: 2,086
Warcaptain is on a distinguished road
Send a message via ICQ to Warcaptain Send a message via AIM to Warcaptain Send a message via Yahoo to Warcaptain
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
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 10:58 PM.


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