ID:178680
 
hey look at this code i seem to be getting an error "Undefined proc" at the base_EventCycle() line.mob
thug2
icon = 'thug2.dmi'
var/tmp
next_walk_time
walking_delay = 10
movement_percent = 50

base_EventCycle()

if(next_walk_time <= world.time)
if(prob(movement_percent))
step_rand(src)
next_walk_time = world.time + walking_delay
return


any help would be appreciated, thankyou.
Akarat wrote:
hey look at this code i seem to be getting an error "Undefined proc" at the base_EventCycle() line.mob
thug2
icon = 'thug2.dmi'
var/tmp
next_walk_time
walking_delay = 10
movement_percent = 50

base_EventCycle()

if(next_walk_time <= world.time)
if(prob(movement_percent))
step_rand(src)
next_walk_time = world.time + walking_delay
return


any help would be appreciated, thankyou.

Looks like something from one of Deadron's libraries. But in this example, base_EventCycle is not defined for thug2, so it makes perfect sense to me that the compiler would tell you so.

If it's supposed to be a top level proc, then it should not be under thug2. By the way, is thug2 a mob or a datum? If it's a mob, define it that way. If base_EventCycle is a mob proc, that would solve your issue.
In response to Skysaw
well it was defined as a mob i just missed a line to copy. and it still doesnt work, so could i have some code on how to fix this please?
In response to Akarat
Akarat wrote:
well it was defined as a mob i just missed a line to copy. and it still doesnt work, so could i have some code on how to fix this please?


If there is this proc:
mob/base_EventCycle()

Then you your code would compile. Where is that proc defined?
In response to Skysaw
it didnt say in the procedure to define a proc?? im not really to sure what defining a procedure means.