client/var/my_turf = get_step(src,mob.dir)
client/var/canAttack = TRUE as num
client/var/mob_found = 0
client/Northeast(mob/M in oview(1))
if (canAttack)
canAttack = FALSE
for(M in var/my_turf)
flick('Attack.dmi',usr)
if(mob_found = 1)
usr<<sound('Enemy-Attack.wav')
M.PCDeathCheck()
sleep(10)
canAttack = TRUE
if (mob_found = 0)
usr<<sound('Attack.wav')
M.PCDeathCheck()
sleep(10)
canAttack = TRUE
I seem to be having a problem, i have checked the help but i still get the same errors. Please someone help me.
ID:149617
Mar 25 2002, 12:05 pm
|
|
In response to Skysaw
|
|
I added a couple other problems in red...
client/var/my_turf = get_step(src,mob.dir) <font color=yellow>if defined here, this must be a constant</font> So what do you want this code to do, anyway? He wants to press client/Northeast() and grab the turf in front of him, then hurt the mob that is in that turf, if any. |
In response to Spuzzum
|
|
hmmmm, i'll try and figure it out and get it running, it will be cool :)
|
In response to Spuzzum
|
|
if(mob_found = 1) <font color=yellow>This block will never execute because you never set mob_found to 1</font> <font color=red>Plus, you need "==", not "="</font><font color=yellow>Actually, that doesn't matter because, as I said it will never execute! ;-)</font></font> |
In response to Skysaw
|
|
Skysaw wrote:
if(mob_found = 1) <font color=yellow>This block will never execute because you never set mob_found to 1</font> <font color=red>Plus, you need "==", not "="</font><font color=yellow>Actually, that doesn't matter because, as I said it will never execute! ;-)</font> <font color=red>Well of course it will never execute if it doesn't even compile. =P</font> |
In response to Spuzzum
|
|
Spuzzum wrote:
Skysaw wrote: |
So what do you want this code to do, anyway?