Thread: Map tracker
View Single Post
  #2  
Unread 09-17-2013, 10:44 AM
Equendil Equendil is offline
The Undying
Interface Author - Click to view interfaces
 
Join Date: Apr 2011
Posts: 52
I have no idea what minecraft is about let alone how its scripting capabilities work but if that's a script that is called every so often by the game engine, what you are doing here is systematically create a new empty array you assign to 'map' every time the script is called, so naturally, it 'forgets' what you have done the last time it was called and you end up with 'nil' values.

You could either move the creation of the 'map' array to some initialization script if that's possible or failing that, make sure you only create the 'map' array once if it does not exist:

Code:
if map == nil then
map = {};
end
__________________
Author of LIP, Bootstrap and Baruk
Reply With Quote