i have a verb :
verb
Suicide()
usr << " You attempted suicide!"
usr:HP -= damage
usr <<"You have have [HP] HP!"
when i use suicide it just states the HP over and over...HP=30
ID:162526
Dec 26 2007, 4:45 pm
|
|
Dec 26 2007, 5:13 pm
|
|
That alone wouldn't do a thing. Here's something I came up with in 3.2 seconds:
|
In response to DisturbedSixx
|
|
u counted 3.2....i would thing that was 3.6 actually
|
In response to Iraqii
|
|
Or, you know, you could subtract the persons HP... or set it to 0
usr.HP -= usr.HP Do not abuse the : operator, use typecasting (.) whenever possible. |
In response to Iraqii
|
|
proc
DeathCheck() if (HP <= 0) world << "[src] dies!" del(src) verb Suicide() var/damage=999999999999999999999999999999999999999999999999 src.HP-damage src.DeathCheck() i get these errors : Dragonball Z The Saga Begins.dm:35:error:damage :invalid proc definition Dragonball Z The Saga Begins.dm:36:error:- :invalid proc definition Dragonball Z The Saga Begins.dm:37:error:src :invalid proc definition Dragonball Z The Saga Begins.dm:26:error:DeathCheck :previous definition Dragonball Z The Saga Begins.dm:62:error:M/:/DeathCheck:undefined type: M/:/DeathCheck |
In response to Iraqii
|
|
You messed up indentation or SOMETHING - I can't say for sure, because you aren't putting your code inside <DM></DM> tags and you aren't showing a large enough block of code - and the compiler is freaking out.
In other news, stop screwing around with large numbers like that. Just do src.HP = 0 and skip the stupid stuff. |