Alright, so..
I have an NPC weapon that parses a string into a multi-dimensional array, then sends it to the serverside.
It was working fine.
I relogged and it broke.
PHP Code:
function onActionServerside() {
player.chat = params[1];
}
//#CLIENTSIDE
triggeraction(0,0,"serverside",name,"useitem",ParseMods(emods(item)),item);
function ParseMods(mods) {
temp.t = mods.tokenize();
temp.willreturn = new[temp.t.size()];
for (temp.modcount: temp.t) {
temp.newmod = temp.modcount.tokenize(":");
for (temp.addmod: temp.newmod) {
temp.willreturn[temp.t.index(modcount)].add(temp.addmod);
}
}
return temp.willreturn;
}
If I set my chat to ParseMods(emods(item))[0] in the clientside, it sets my chat to 'addhpp,.3'
ParseMods(emods(item))[0][0] returns 'addhp'
It's parsing it fine.
However, when it tries to read params[1] in the serverside, it gives me 1.
Just 1. There's nothing else. params[1].size() is 0.
I know it's possible to pass arrays through triggeractions, as I've done it before.
Any help?