Thread: string problem
View Single Post
  #7  
Old 02-05-2002, 05:26 AM
Gohan43331 Gohan43331 is offline
Registered User
Join Date: Jan 2002
Posts: 87
Gohan43331 is on a distinguished road
Send a message via AIM to 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
Reply With Quote