ID:149979
 
heres some code for my game


mob
player
icon = 'player.dmi'
density = 0

verb
run()
client.North()
walk(usr,NORTH,0)
client.South()
walk(usr,SOUTH,0)

client.West()
walk(usr,WEST,0)

client.East()
walk(usr,EAST,0)

client.Northwest()
walk(usr,NORTHWEST,0)

client.Northeast()
walk(usr,NORTHEAST,0)

client.Southeast()
walk(usr,SOUTHEAST,0)

client.Southwest()
walk(usr,SOUTHWEST,0)


but for some reason i get this error message

Main code.dm:11:error: proc definition not allowed inside another proc

Can anyone tell me what ive done wrong?
Jotdaniel wrote:
> heres some code for my game
>
>
> mob
> player
> icon = 'player.dmi'
> density = 0
>
> verb
> run()//you are defining a new proc
> client.North()//here is a built in proc
> walk(usr,NORTH,0)//here you give a definition for that built in proc, bad
> client.South()
> walk(usr,SOUTH,0)
>
> client.West()
> walk(usr,WEST,0)
>
> client.East()
> walk(usr,EAST,0)
>
> client.Northwest()
> walk(usr,NORTHWEST,0)
>
> client.Northeast()
> walk(usr,NORTHEAST,0)
>
> client.Southeast()
> walk(usr,SOUTHEAST,0)
>
> client.Southwest()
> walk(usr,SOUTHWEST,0)

you cannot define predefined procs inside of procs
In response to FIREking
you cannot define predefined procs inside of procs

You cannot define ANY procs inside of procs. =P