ID:266851
 
ok when i try to give my mobs hp so i can kill them when battling them i always get a previous defenition bug its really annoying cause i cant progress any further in the game im making without my mobs having hp
Hellgate_uk wrote:
ok when i try to give my mobs hp so i can kill them when battling them i always get a previous defenition bug its really annoying cause i cant progress any further in the game im making without my mobs having hp

This isn't a bug; it's a compilation error from a problem in your own code.

"Previous definition" goes along with "redefinition of ____" and means you've defined something more than once. That means, for example, you might have a case like this:
mob
var/HP

mob/player
var/HP // this is redundant; it'll cause a bug

Lummox JR
Hellgate_uk wrote:
ok when i try to give my mobs hp so i can kill them when battling them i always get a previous defenition bug its really annoying cause i cant progress any further in the game im making without my mobs having hp


That means you've defined it in more than one place. Each variable should have only one definition.

Example 1 (will not compile)

mob
var
HP <font color=yellow>// (def 1)</font>

player
var
HP = 100 <font color=yellow>// (def 2)</font>

Example 2 (will compile)
mob
var
HP

player
HP = 100