As an example, in the Thread script made by CloneTrooper, or fastwait, you see some functions like this:
function Thread:Wait(t: number?)
what is the t: number
?
As an example, in the Thread script made by CloneTrooper, or fastwait, you see some functions like this:
function Thread:Wait(t: number?)
what is the t: number
?
I think it’s the type of the variable, this time it’s a number, but if you do t: string, it should be a string.
I don’t really know how it works but in C, if t is not a number and you call a function where t has to be a number, it will error.
Correct me if I’m wrong
Cool! That seems nice to use in modules! Now I dont have to use type() in an if everytime.
Well you still have to do that because strict mode is only used by typechecker in edit mode, those type declarations gets ignored by intepreter on runtime.