I know but when the table is empty the for statement will never stopAdil wrote: And by default tables are indexed from 1.
Search found 3 matches
- Tue Jun 07, 2016 9:03 pm
- Forum: Modding help
- Topic: nil value by acces to global variable
- Replies: 6
- Views: 2742
Re: nil value by acces to global variable
- Tue Jun 07, 2016 7:21 pm
- Forum: Modding help
- Topic: nil value by acces to global variable
- Replies: 6
- Views: 2742
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 ...
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 ...
- Sun Jun 05, 2016 2:07 pm
- Forum: Modding help
- Topic: global variable returns nil
- Replies: 1
- Views: 1221
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 ...
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 ...