Trouble with Switch Statement in Developer Help
|
|
Code:
mob npc var disp = 45 attack = 90 flee = 40 greet = "" detectplayer = 0 proc var roll = 0 GreetRoll(mob/npc/M) switch if(M.disp <= 25 && M.detectplayer == 1) roll = rand(1,3) switch if(roll == 1) M.greet = "What are you doing around here? Get lost!" if(roll == 2) M.greet = "You know I hate you, and you know I can't tand your presence. Go away." if(roll == 3) M.greet = "I hate you so much..."
|
Problem description:
I was working on the AI for a game I'm working on. I haven't used DM in MONTHS, so I have pretty much forgotten everything. The compiling results are:
if(M.disp <= 25 && M.detectplayer == 1) - missing expression
if(roll == 1) - missing expression
|