ID:144231
 
Code:
mob
verb
Transform()
set category = "Skills"
if (src.race == "Goku")
if (usr.maxpowerlevel <= 300)
usr << "Train harder!"
else
usr << "AHH!<br>You get a huge boost as energy surges through you!"
usr.icon = 'Super saiyan.dmi'
usr.icon_state = "Mob"
usr.strength *= 2
usr.defense *= 2
usr.powerlevel *= 1.5
usr.ki *= 2
usr.transed = 1
if(usr.transed == 1)
usr << "You cannot Transform again!"


Problem description:
no errors but you can transform repeadtly which i dont want

i have put
                if(usr.transed == 1)
usr << "You cannot Transform again!"
but it dont work and it was at the bottom of the code

In response to Shomone
use return to stop them.
Two problems there.

Firstly, the transed var is a boolean(a var which never anything else than 1 or 0; respectively TRUE and False), to check their value in an if() statement, never use ==. Use if(var) for TRUE values, and if(!var) for FALSE values.

Your main problem is that you are checking whether the mob has transformed after he has transformed, which makes it able to transform unlimited.

To solve this, just check whether transed is FALSE somewhere earlier the Transformverb.

O-matic
In response to O-matic
Also didnt i give you a transform system already?