Search found 3 matches

by derbobo
Tue Jun 07, 2016 9:03 pm
Forum: Modding help
Topic: nil value by acces to global variable
Replies: 6
Views: 2601

Re: nil value by acces to global variable

Adil wrote: And by default tables are indexed from 1.
I know but when the table is empty the for statement will never stop ;)
by derbobo
Tue Jun 07, 2016 7:21 pm
Forum: Modding help
Topic: nil value by acces to global variable
Replies: 6
Views: 2601

nil value by acces to global variable

Hello,
I have problem with a mod i try to make , beacaue everytime when i try to run a function called add_newelementextension i´ll get this error message:"control.lua:23: attempt to index field 'taxiextension' (a nil value)"

here is my code:

require "util"
require "defines"
script.on_load ...
by derbobo
Sun Jun 05, 2016 2:07 pm
Forum: Modding help
Topic: global variable returns nil
Replies: 1
Views: 1154

global variable returns nil

Hello
I try to make a new mod and for this mod I need to access a global variable, but every time I try to access this variablr I´ll get this error message: attempt to index global 'glob' (a nil value)
Here is the code:
require "util"
require "defines"
script.on_load(function()
if glob.available ...

Go to advanced search