Well i had got the basic clientr. thing working, but i've reached a problem where i cant seem to get the vars to set an existing param to a new param. Heres pretty much exactly what i'm currently stuck on. I dont think the formatting of this is right.
PHP Code:
function onActionServerSide(cmd, equipname){
if(cmd == "equip"){
clientr.equips[0]={equipname[0]};
};
and even if i get this to work, (though probably a simple fix) that's just putting the name of the equip in the variable for the GUI's to read and tell the player. everything else is still convoluted and disorganized. Basically, I'm trying to set the requirements of the equip, the name of the equip, the set stats of the equip (defense mods), and the other stats (stat bonuses that may not be present in all equipment) and where all of it's params will be stored in clientr.var params.
(so for example, the helm goes in clientr.equips[0] so any given piece doesnt end up with multiple instances of itself in clientr.equips)
then once i get
that done, i'm definitely going to run into the issue of figuring out how to load the extra stat bonuses without needing to set empty parameters for every equip.
Then finally, I also have the problem on where to even store the equipment data since i'm using variables instead of keeping them in readable docs or something. (currently i'm storing the equip data in inventory system itself. bad idea, i know. Though I was planning on storing it in a dbnpc. though something's telling me that's not the right thing to do either.)
I'm kind of stuck in a rut here. Should I keep trying to get all of this stuff working through clientr.vars? It seems like all i would need to know to use SQLite is knowledge of how to store the info in the database (arcs?) and how to access the data through scripts instead of trying to re-sort all of the data i have now, tell the script what's what, and where it goes.
Any suggestions?