ID:139639
 
Okay u.u im a new coder and i need us help plz T.T

Code:
for(var/mob/M in world)
if(M.in_team)
if(M.teamid == src.mob.teamid)


Problem description:
login.dm:559:error: M.in_team: undefined var
login.dm:560:error: M.teamid: undefined var


T.T
You need to define this var that you are using in the code.
For example if you are using code:

if usr.HP <=0  //If user's HP is equal to 0
//then kill him


but if u are using it without defining the var HP, you will absolutely get the error, HP, undefined var.

You need to define it to get it work. Use this code to define a var, for example, let's take HP.

mob
var
HP = 50


By this way, your HP var is defined and you can now use it, in the same way you need to define those team vars like the way you want.

Enjoy...
mob/var
in_team
teamid

also src.mob.teamid wont be helpfull.. try defining src and then using src.teamid
In response to Taha123
Taha123 wrote:
> mob/var
> in_team
> teamid
>

also src.mob.teamid wont be helpfull.. try defining src and then using src.teamid

src.mob would be needed if he has client/proc.