View Single Post
  #8  
Old 12-10-2006, 07:52 PM
contiga contiga is offline
Graal2001 Administration
contiga's Avatar
Join Date: Jul 2004
Location: Netherlands
Posts: 419
contiga is an unknown quantity at this point
Send a message via ICQ to contiga Send a message via AIM to contiga Send a message via MSN to contiga Send a message via Yahoo to contiga
Quote:
Originally Posted by Chompy View Post
Hmm, ok

One last question: can I set a member directly? Since when I load a member
by using obj.loadvars() it appears as an array, like if I did echo( arcnames[ 0]) it would return the first member, so.. Can I set it directly?

PHP Code:
object.arcnames0] = "foo"
This is for the ammount stuff, to change an current ammount of an arc
You could make a function for it.. player.changeArc( arc, positive or negative ammount);

and then:
PHP Code:
public function changeArcarcmod) {
  
obj = new TStaticVar();
  
obj.loadVars"bladiebla/blabla/file.arc");
  
temp.a_index obj.arcnames.indexarc);
  
temp.a_current objtemp.a_index].ammounts;
  
temp.a_new = ( mod.substring01) == "-") ? temp.a_current mod.substring1) : temp.a_current mod;
  
objtemp.a_index].ammounts temp.a_new;
  
obj.saveVars"bladiebla/blabla/file.arc"0);

Oh and add 'sendToRC( "/refreshfilelist");' after every function by the way, so it updates the file browser also.
__________________
AIM: Contiga122
MSN: [email protected]
Status:
Quote:
Originally Posted by unixmad View Post
I am also awake 3AM to help correct problems.
Quote:
Originally Posted by Bomy Island RC people
Daniel: HoudiniMan is a bad guy =p
*Bell: rofl. I first read that as houdini is a bad man. like the little kid that wants his mommy to keep her away from that boogie man
Daniel: xD
*Rufus: I wouldn't want my kids around him.
Reply With Quote