ID:266851
Jul 26 2002, 10:24 am
|
|
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 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 |
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:
Lummox JR