Hey, i got this problem with params when using tokenize, could someone explain why these params are read as 0?
NPC Code:
//from another part of the script:
setstring server.hammerresources,sand,0,wood,25,ore,15;
setstring client.makeweapon,hammer;
tokenize #s(server.#s(client.makeweapon)resources);
//end
if (strtofloat(#t(3))>0){
this.recsneeded++;
if (strtofloat(#s(client.wood))>=strtofloat(#p(3))){
this.ok++;
setstring client.wood,#v(strtofloat(#s(client.wood))-strtofloat(#p(3)));
}else setplayerprop #c,You dont have enough recourses!;
}
if (strtofloat(#t(5))>0){
this.recsneeded++;
if (strtofloat(#s(client.ore))>=strtofloat(#p(5))){
this.ok++;
setstring client.ore,#v(strtofloat(#p(5)));
}else setplayerprop #c,You dont have enough recourses!;
}