ID:150750
 
proc
DeathCheck()
if(hp <= 0)
world << "[src] was tagged by [usr]!"
src.Move(locate(199,99,1))
sleep(300)
if(icon = 'blue.dmi')
usr.Move(locate(10,186,1))
if(icon = 'red.dmi')
usr.Move(locate(191,19,1))

I am trying to get this to move the player to a confined place after dying, then move them back after it sleeps for 30 seconds.. I get the following errors

combat.dm:19:error: proc definition not allowed inside another proc
combat.dm:24:error: unbalanced }

I have tried different ways and not succesful.
On 8/2/01 10:33 am Oblivian wrote:
proc
DeathCheck()
if(hp <= 0)
world << "[src] was tagged by [usr]!"
src.Move(locate(199,99,1))
sleep(300)
if(icon = 'blue.dmi')
usr.Move(locate(10,186,1))
if(icon = 'red.dmi')
usr.Move(locate(191,19,1))

Remove the indentation from the lines under sleep()
In response to Shadowdarke
On 8/2/01 10:46 am Shadowdarke wrote:
On 8/2/01 10:33 am Oblivian wrote:
proc
DeathCheck()
if(hp <= 0)
world << "[src] was tagged by [usr]!"
src.Move(locate(199,99,1))
sleep(300)
if(icon = 'blue.dmi')
usr.Move(locate(10,186,1))
if(icon = 'red.dmi')
usr.Move(locate(191,19,1))

Remove the indentation from the lines under sleep()

Now the two if commands get a "Missing Expression" Error?
Never seen that before.
In response to Oblivian
On 8/2/01 10:52 am Oblivian wrote:
On 8/2/01 10:46 am Shadowdarke wrote:
On 8/2/01 10:33 am Oblivian wrote:
proc
DeathCheck()
if(hp <= 0)
world << "[src] was tagged by [usr]!"
src.Move(locate(199,99,1))
sleep(300)
if(icon = 'blue.dmi')
usr.Move(locate(10,186,1))
if(icon = 'red.dmi')
usr.Move(locate(191,19,1))

Remove the indentation from the lines under sleep()

Now the two if commands get a "Missing Expression" Error?
Never seen that before.

Change = to == (two equal signs)
= is an assignment
== is a comparison
In response to Skysaw
On 8/2/01 10:53 am Skysaw wrote:
On 8/2/01 10:52 am Oblivian wrote:
On 8/2/01 10:46 am Shadowdarke wrote:
On 8/2/01 10:33 am Oblivian wrote:
proc
DeathCheck()
if(hp <= 0)
world << "[src] was tagged by [usr]!"
src.Move(locate(199,99,1))
sleep(300)
if(icon = 'blue.dmi')
usr.Move(locate(10,186,1))
if(icon = 'red.dmi')
usr.Move(locate(191,19,1))

Remove the indentation from the lines under sleep()

Now the two if commands get a "Missing Expression" Error?
Never seen that before.

Change = to == (two equal signs)
= is an assignment
== is a comparison
Oh.. I see now :) Thanx for the help all.