Thread: string problem
View Single Post
  #9  
Old 02-05-2002, 08:16 AM
TDK_RC6 TDK_RC6 is offline
Registered User
TDK_RC6's Avatar
Join Date: Jan 2002
Location: Earth
Posts: 0
TDK_RC6 is on a distinguished road
Quote:
Originally posted by Gohan43331
I'm also having a problem with strings...
NPC Code:

// Example:
if (playertouchsme) {
if (strequals(balance,#c)) {
say2 Greetings. Your balance is: #v(strtofloat(brbank));
}
tokenize #c;
if (strequals(deposit,#t(0))&&playerrupees>=strtofloa t(#t(1))) {
this.brbanktemp=brbank+strtofloat(#t(1));
playerrupees-=strtofloat(#t(1));
setstring brbank,#v(this.brbanktemp);
say2 Deposited #t(1) gralats.#bBalance is now #v(strtofloat(brbank));
}
}



When i deposit, say...1 gralat...it always says the ammount deposited, but never resets the brbank string... And every time i check the balance...no matter what the this.brbanktemp or str(brbank) is...IT"S ALWAYS 00000000000000...
:grrr: :grrr: :grrr:

(Irritated) Gohan
you shouldn't do strequals(balance,#c), well atleast i dont think so, you should do strequals(#c,balance)
__________________
Staff on Renegade


email: [email protected]
aim: papivicente
Reply With Quote