PDA

View Full Version : Lua Error



RealRitzcracker
July 20th, 2006, 19:58
Im getting a lua error of global timer 'timer' a nil value
what is that.
And when it says the line
like lua:script.lua:10
do you count spaces or not.

yaustar
July 20th, 2006, 20:04
a) It means that 'timer' variable was created but not given a value yet.

b) Yes, you count blank lines. Use Crimson Editor or another text editor that shows line numbers.

MasterChafed
July 20th, 2006, 20:12
i use Text editor, all you press is alt-g and type the line with the error and it goes right to it. It also has a nifty find and replace feature.

ninja9393
July 20th, 2006, 20:12
ConTEXT is also a good text editor:D

yaustar
July 20th, 2006, 20:19
Text Editor is not freeware and ConTEXT had problems with line wrap last time I used it.

Notepad2 is the lightest weight one that I have used but lacks sytanx highlighting for Lua.

PsPad Editor is my weapon of choice. Syntax highlighting for various languages, diff, spell checking, splitviews on the same file and a ton more features. Free as well.

jman420
July 20th, 2006, 20:50
I think that all you have to do is add () after you declare your "timer"

timer()

at least thats the same error I got when I tried to call

"player"

without the ()

and when it tells you what line its on, thats the line, even if lines 1 - 9 are empty

and personaly, I use microsoft wordpad lol...

BL4Z3D247
July 20th, 2006, 20:54
cool i've been gettin that error for a couple days and now i know why lol i was drivin me crazy :D

RealRitzcracker
July 21st, 2006, 03:31
Is it possible to make 3d games in lua

Apoklepz
July 21st, 2006, 16:50
To answer your last question, Yes it is possible to make 3D games in Lua...There's samples in the DCemu Lua Downloads page...I advise you check them out.

jman420
July 21st, 2006, 19:26
also, I just got (from Apoklepz) a GMax 2 PSP plugin for GMax, that supposedly allows for 3D models to be used on Lua. I havent tried it yet, but when I do I will make a thread about how to use it (if I can figure it out:P)