Thread: Param Problem
View Single Post
  #1  
Old 07-23-2002, 04:33 AM
darkriders_p2p darkriders_p2p is offline
Registered User
Join Date: Jan 2002
Location: Canada
Posts: 690
darkriders_p2p is on a distinguished road
Param Problem


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!;
}

__________________
maximus_asinus

Last edited by darkriders_p2p; 07-23-2002 at 07:04 PM..
Reply With Quote