View Single Post
  #1  
Old 03-18-2004, 03:03 AM
wonderboysp2p wonderboysp2p is offline
Registered User
wonderboysp2p's Avatar
Join Date: Sep 2002
Location: -Wonderboy
Posts: 537
wonderboysp2p is on a distinguished road
Send a message via AIM to wonderboysp2p
Arrow -now what am i doing wrong?

ive been nored and working on a rescript of the inventory system and its comin along pretty good

the script works fine except for ONE thing! it repeats the "replace string" -for adding to the quantity of the item- twice for seom hideously odd reason.

if (actionact) {
if (lindexof(#s(this.item),client.inv)==-1){
addstring client.inv,Apple;
addstring client.invcount,1;
}
else {
replacestring client.invcount,lindexof(#s(this.item),client.inv) ,#v(strtofloat(#I(client.invcount,lindexof(#s(this .item),client.inv)))+1);
}
}

the action command is simply

if (keypressed){
if (keydown(6)){
triggeraction playerx+1.5+vecx(playerdir)*2,playery+2+vecy(playe rdir)*2,act,;
}
}

any help, id appreciate ^_^
__________________

we are the llama FORUms!!!EWQ Ce13d5423f23!! 2e1 @$6tgv3uy65!
Reply With Quote