Author Topic: Defining?  (Read 1053 times)

If I wanted

Code: [Select]
%client.quantity["Ore"]
To equal three thing's would this code work?

Code: [Select]
%client.quantity["Ore"] = %client.quantity["CopperOre"] || %client.quantity["SilverOre"] || %client.quantity["GoldOre"];

How is that ever going to work? You could have the three ores split by a delimiter such as a tab. For example:

%client.quantity["Ore"] = %client.quantity["CopperOre"] TAB OtherOre TAB OtherOre;

But it seems a bit redundant. Maybe explaining further what you're trying to do would aid you in gaining a more appropriate response or solution.

Ok, Well im working on a saving feature for my RPG so that on leave it will save and on enter it will load I just need to know how to add more than 1 feature to it so I can save gold,exp,ore ect. Should I PM you what I got so far?





You could look at the wrench events stuff, it saves it to a file.
Or, if you only want it during the time your server is up, save it in a global variable such as $playerore[%client.BL_ID]=%ore1 SPC %ore2....

Then use getword() to split it again after they rejoin.