• 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 TFS 1.2

Itutorial

Legendary OT User
Joined
Dec 23, 2014
Messages
2,339
Solutions
68
Reaction score
1,024
I am using the lastest "stable" version. When im trying to use addEvent the script just doesn't even register that it is there. No error, no nothing. It just ignores the line completely.

Why the hell would addEvent not work?

Ex: addEvent(eventName, time, ...)

It doesn't do anything.
 
Here's a couple examples I made, If you need an example of how a function is used you can usually find it being used correctly in vanilla TFS.

If you are having trouble finding examples enable windows search indexing (search for text in files) for your TFS directory so you can search for examples in file explorer.

Lua:
local millisecondsDelay = 2000
function testFunction(var1, var2)
    print("delayed function")
end
addEvent(testFunction, millisecondsDelay, var1, var2)

--or

--Anonymous function
addEvent(function(var1)
    print("delayed anonymous function")
end, millisecondsDelay, var1)
 
I am using the lastest "stable" version. When im trying to use addEvent the script just doesn't even register that it is there. No error, no nothing. It just ignores the line completely.

Why the hell would addEvent not work?

Ex: addEvent(eventName, time, ...)

It doesn't do anything.

I like to use this way:

Code:
addEvent(function() print("something") end, time)
 
I never figured out what the problem was but it fixed itself anyway. It was acting as if the method addEvent didn't exist at all. Anyway, its fixed but I have no idea how or what was going on.
 
Back
Top