ID:148611
 
Here is the code

mob/monster/vegeta
name = "Vegeta"
icon = 'vegeta.dmi'
PL = 570000
str = 7200
HP = 1200
def = 7200
gold = 2500
if(PL <= 100000)
flick("ssj",M)
usr << "Message"
icon = "vegetassj"
PL = 1250000
str = 72000
HP = 12000
def = 72000

and here are the errors I get...

Monsters.dm:62:error:PL:duplicate definition
Monsters.dm:62:error:100000:duplicate definition
Monsters.dm:62:error:<= :instruction not allowed here
Monsters.dm:62:error::empty type name (indentation error?)
Monsters.dm:63:error:"ssj":duplicate definition
Monsters.dm:63:error:M:duplicate definition
Monsters.dm:64:error:usr:duplicate definition
Monsters.dm:64:error:"Message":duplicate definition
Monsters.dm:64:error:<< :instruction not allowed here
Monsters.dm:63:error::empty type name (indentation error?)
Monsters.dm:62:error::empty type name (indentation error?)

Does anyone know what could be wrong? And How To Fix It?
if() must be in a proc, as well as everything after it.
Kamion wrote:
Here is the code

mob/monster/vegeta
name = "Vegeta"
icon = 'vegeta.dmi'
PL = 570000
str = 7200
HP = 1200
def = 7200
gold = 2500
if(PL <= 100000)
flick("ssj",M)
usr << "Message"
icon = "vegetassj"
PL = 1250000
str = 72000
HP = 12000
def = 72000

and here are the errors I get...

Monsters.dm:62:error:PL:duplicate definition
Monsters.dm:62:error:100000:duplicate definition
Monsters.dm:62:error:<= :instruction not allowed here
Monsters.dm:62:error::empty type name (indentation error?)
Monsters.dm:63:error:"ssj":duplicate definition
Monsters.dm:63:error:M:duplicate definition
Monsters.dm:64:error:usr:duplicate definition
Monsters.dm:64:error:"Message":duplicate definition
Monsters.dm:64:error:<< :instruction not allowed here
Monsters.dm:63:error::empty type name (indentation error?)
Monsters.dm:62:error::empty type name (indentation error?)

Does anyone know what could be wrong? And How To Fix It?

Alright, first off, the if() is indented, which cannot be. Also why would you implement an if() in a mob/whatever usage? That won't work. Try something like this:
mob/monster/vegeta
name = "Vegeta"
icon = 'vegeta.dmi'
PL = 570000
str = 7200
HP = 1200
def = 7200
gold = 2500
mob
New()
.=..()
while(usr)
if(PL <= 100000)
flick("ssj",M)
usr << "Message"
icon = "vegetassj"
PL = 1250000
str = 72000
HP = 12000
def = 72000
sleep(4)


RaeKwon
In response to RaeKwon
What I wan't it to do is when vegeta gets down to a certain amount of HP, he goes SSJ. Will this code do that?
In response to Kamion
Kamion wrote:
What I wan't it to do is when vegeta gets down to a certain amount of HP, he goes SSJ. Will this code do that?

Should've tryed it, and yes.

RaeKwon
In response to RaeKwon
Despite the highly inefficient and poorly designed nature of it.
In response to RaeKwon
K, thanks