ID:146243
 
Code:
mob
verb
ssj()
src << "You become a SSJ!"
ssj = 1
world << "[name] Has become a SSJ"
attack *= 2
Defence *= 2
powerlevel *= 2
maxpowerlevel *= 2
icon_state = "ssj"
if icon_state = "Vegeta" <--- missing condition here
icon_state_flick = "SS"


Problem description:
when i login i can be goku or vegeta the icon is goku and vegeta but when i am vegeta and i click to go ssj it becoes goku so i tryed to make it go to vegetas ssj state but it doesn't work i get a missing condition can you help
mob
verb
ssj()
src << "You become a SSJ!"
ssj = 1
world << "[name] Has become a SSJ"
attack *= 2
Defence *= 2
powerlevel *= 2
maxpowerlevel *= 2
icon_state = "ssj"
if(icon_state == "Vegeta") <--- missing condition here
//something here or you get empty IF statement!
icon_state_flick = "SS"
In response to Cheetoz
i get new problems

mob
verb
ssj()
src << "You become a SSJ!"
ssj = 1
world << "[name] Has become a SSJ"
attack *= 2
Defence *= 2
powerlevel *= 2
maxpowerlevel *= 2
icon_state = "ssj"
if(icon_state == "Vegeta") if statement no affect
//something here or you get empty IF statement!
icon_state_flick = "SS"


Transformations.dm:22:if :warning: if statement has no effect

In response to Englishkid
mob
verb
ssj()
src << "You become a SSJ!"
ssj = 1
world << "[name] Has become a SSJ"
attack *= 2
Defence *= 2
powerlevel *= 2
maxpowerlevel *= 2
icon_state = "ssj"
if(icon_state == "Vegeta"
icon_state_flick = "SS"



That should work.
In response to N1ghtW1ng
....I EVEN TOLD YOU ABOUT THAT ERROR! WTF!
In response to Cheetoz
ih yeh i see that now


but i got another error

mob
verb
ssj()
src << "You become a SSJ!"
ssj = 1
world << "[name] Has become a SSJ"
attack *= 2
Defence *= 2
powerlevel *= 2
maxpowerlevel *= 2
icon_state = "ssj"
if(icon_state == "Vegeta"
icon_state_flick = "SS"

Transformations.dm:23:error: icon_state_flick: missing comma ',' or right-paren ')'


In response to Englishkid
lol just do what it says man, It says its missing a right paren so look for any parenthesis in the code that isnt closed.
In response to Turles9000
umm i am not good at coding so thats why i asked for help duh and cna someone do it because i can't see a problem with it
In response to Englishkid
if it says a ) is missing, add a ) DUH, Try checking the rules Above/Under line 23(pretty obvious where the problem is, at 22)
In response to Englishkid
In response to ManDroid13
mob
verb
ssj()
set category = "Attacks"
src << "You begin to change!"
sleep(1)
src << "You feel a great power rising in you"
icon_state = "SS1Tranz"
sleep(30)
world << "[name] Has become a SSJ"
ssj = 1
attack *= 2
Defence *= 2
powerlevel *= 2
maxpowerlevel *= 2
icon_state = "ssj"
if(icon_state == ')Vegeta'
icon_state_flick = ',SS'



i still get the same error
In response to Englishkid
Englishkid wrote:
mob
verb
ssj()
set category = "Attacks"
src << "You begin to change!"
sleep(1)
src << "You feel a great power rising in you"
icon_state = "SS1Tranz"
sleep(30)
world << "[name] Has become a SSJ"
ssj = 1
attack *= 2
Defence *= 2
powerlevel *= 2
maxpowerlevel *= 2
icon_state = "ssj"
if(icon_state == 'Vegeta'
icon_state_flick = ',SS')
Look where I changed the ), I think it should work now...
In response to Zieth
nope exactly the same problem so whats wrong now
In response to Englishkid
omg, ewwwww ... you people missed the obvious part of the error:
mob
verb
ssj()
src << "You become a SSJ!"
ssj = 1
world << "[name] Has become a SSJ"
attack *= 2
Defence *= 2
powerlevel *= 2
maxpowerlevel *= 2
icon_state = "ssj"
if(icon_state == "Vegeta") //THIS IS WHERE ) should be!!!!
icon_state_flick = "SS"


When you have an open bracket error, usually it's one line above than what the DM tells you... also, for icon_state_flick, unless you have a proc ready to read it and flick your icon to it, you may want to make it
flick("SS",src)
... so if you want to use that, it'll be

mob
verb
ssj()
src << "You become a SSJ!"
ssj = 1
world << "[name] Has become a SSJ"
attack *= 2
Defence *= 2
powerlevel *= 2
maxpowerlevel *= 2
icon_state = "ssj"
if(icon_state == "Vegeta") //THIS IS WHERE ) should be!!!!
flick("SS",src)


Also, please, PLEASE, PLEASE, PLEASE, PLEASE use
</pre> and <pre>
when giving a part of your code!

If you have a race var than use it instead of icon_state in the code

if(icon_state == "Vegeta")


because if the person's icon_state wasn't vegeta... much more safer using
if(race == "Vegeta")


Err, hope you got the gist of what I was saying... hmm strange, I have been around the forums helping a lot lately