![]() |
|
E2 Function timers [BROKEN] - Printable Version +- Team Spartan Cookies & Milk Forums (https://teamscm.co.uk) +-- Forum: Garry's Mod (https://teamscm.co.uk/forum-4.html) +--- Forum: Help and Support (https://teamscm.co.uk/forum-8.html) +--- Thread: E2 Function timers [BROKEN] (/thread-408.html) |
E2 Function timers [BROKEN] - LocInt - 08-08-2014 Hello! I recently joined to this server and tried out my E2 scripts. I tried to use function timers but for some reason those timers just do not call my functions. Now you ask maybe I did it wrong? Well I didn't because when I set wrong function name to the timer it notified me. Then I asked myself maybe I did it wrong and then I tried the example from this forums. Well the original version is using hint instead of print and is missing one ) but anyway this does not work. It does not print a thing. Code: @name Function timer test
@inputs A B C
function midPoint(A, B) #Hint the mid point between the numbers A and B.
{
print( toString( ( A + B / 2 ), 7 ))
}
#After one second and only once, run the midPoint() function with arguments given by the inputs A and B.
timer(1000,1,"midpoint","midPoint(nn)",A, B)
function entity:checkID(ID) #Hint if the number given matches the entity's ID.
{
if(This:id() == ID)
{
hint("ID: "+ID+" matched.",7)
}
else
{
hint("ID did not match.",7)
}
}
#Every 5 seconds, repeated infinitely, run the checkID function on the owner with argument given by the input C.
timer(5000,0,"IDCheck","checkID(e:n)",owner(),C)I even tried this: Code: Think=50
timer(Think,0,"Think","think()")
function think() {
print("print lol")
}Im lua coder myself so I can help to resolve this issue if its required. LocInt RE: E2 Function timers [BROKEN] - Person8880 - 08-08-2014 The extension was a very old version. I've updated it now so it ought to work. RE: E2 Function timers [BROKEN] - LocInt - 08-08-2014 Great! Works now! |