Time() -> attempt to call 'integer'

The time function doesnt work! I use it:

local time_now = time();

and get the error message: attempt to call ‘integer’

LOL, just in this moment, I found my problem :smiley:
I use a variable named “time” in my code ^^

Haha - I’ve made that mistake before… it’s a really fun problem to find / debug :slight_smile:

I got myself into all sorts of trouble adding a slot with the name “len” to a table.

Something we’ve talked about doing in the future is adding Squirrel-compiler warnings – for things that can’t be hard errors, because it would break existing code, but for which we’d like to say, effectively, “Are you sure you meant to do that? It might not behave how you expect.”

Defining globals, or adding slots, that hide standard globals or slots would fall into that category…

Peter