• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Lua I can not make StopEvent work

lekods

New Member
Joined
Jun 12, 2011
Messages
18
Reaction score
1
I am having a problem in working with StopEvent on my 0.3.6 Server, I add the following command in a file in lib/myfile.lua

Ex:
Code:
function myFunc(cid, monster)
    EVENT_ID_28 = addEvent(myFuncWithAddEvent, 30 * 1000, monster)
    ...
end

function myFuncWithAddEvent(monster)
    doBroadcastMessage("msg text")
    doRemoveCreature("monster")
    ...
    ...
end
* I'm calling function in an action file

When I run the stopEvent for example, in a file like creaturescript with the onDeath function the event is not canceled.

Code:
function onDeath(cid, corpse, deathList)
    stopEvent(EVENT_ID_28)
end

What am I doing wrong that stopEvent is not being canceled?
 
Last edited:
0.3.6 doesn't have shared lua interfaces
meaning you cant call a variable from action scripts in a creaturescript
 
Back
Top