Thread: need help
View Single Post
  #2  
Old 07-16-2005, 12:30 PM
projectigi projectigi is offline
Registered User
Join Date: Jan 2004
Posts: 403
projectigi is an unknown quantity at this point
Quote:
Originally Posted by raiden0899
im working on a money system and i'm trying to figure out how to change the value of the money variables. heres a part of the script:
NPC Code:

if (keypressed) {
if (strequals(#p(1),n)) {
setstring client.dollars,strtofloat(client.dollars)+=1;
}
}


when i press n, it changes dollars to "strtofloat(client.dollars)+=1" instead of raising it by 1. can someone tell me what i'm doing wrong?
try
NPC Code:

if (keypressed) {
if (strequals(#p(1),n)) {
setstring client.dollars,#v(strtofloat(#s(client.dollars))+= 1);
}
}

Reply With Quote