ID:148220
 
        if("Flee")
if(usr.agi >= M.agi)
usr <<"[usr]Flees"
else
looping=1
usr<<"[usr] atempts to flee but fails"

I dont understand wuts wrong with this it says expected if or else statment
You really need to show more of your proc here, but the problem seems to be related to screwy indentation. If you'll notice, everything under the first if() is indented way over, and the line following the else appears not to be indented far enough to match the line below it (so the else is empty, and the line after looping=1 is indented for no apparent reason as far as DM can tell).

Lummox JR
    verb
Attack(mob/M in oview(1))
set category = "Fighting"
var/looping=1
while(looping)
looping=0
switch(input("Attack Or Flee?","What would you like to do!",text) in list ("Attack","Flee"))
if("Attack")
if(!M.npc)
var/dam = rand(5,usr.str)
dam -= rand(1,M.def)
if (dam > 0)
M.hp -= dam
view(6) << "[usr] attacks [M] for [dam] health!"
else
view(6) << "[usr] attacks [M] but MISSES!"
if (M.hp <= 0)
die(M)
return
looping=1
else
usr << "You can't hit npc's!"
if("Flee")
if(usr.agi >= M.agi)
usr <<"[usr]Flees"
else
usr<<"[usr] atempts to flee but fails"
looping=1
thats the rest of it
In response to Cloud54367
else
usr << "You can't hit npc's!"


That should be indented once more.