ID:141159
 
Code:mob
icon = 'wizard.dmi'
var
hp = 5



Problem description:what do i do when it says previous/duplicate definition? If I have to make a var, what would it be in this case?


Nevermind, I fixed it, thanks.



You already have a var named "hp".
In response to Mysame
In other words, just delete one of the vars named "hp" and your should be good to go.
so i cant have 2 hp's? for npc's and the player?
In response to Micdogmic
Of course you can, they just use the same variable.

Welcome, novice programmer.
In response to Mysame
Yeah like what Mysame said, one variable should be enough for both players and npc's. If you want a different life for npc's and a different life for players should change the name of the variable.