Jump to content

table storing problem


Snoozy

Recommended Posts

I'm trying to retrieve information I stored in another lua file in a whole different lua file during the server being running, Currently it does not seem to work tbh. What I'm doing is following:

File1

IntInfo = {} -- At start of the script 
  
IntInfo[idx] = {} -- In the for idx = 1,max do 
  

Then I load some stuff into the IntInfo.

File2

IntInfo = {} -- At start of the script 
  
IntInfo[idx] = {} --used after checking again with for idx= 1, max do 
--but this time it's for a binded key R used for entering interiors. 
--Then I do some for example: 
setElementPosition (source,IntInfo[idx].X,IntInfo[idx].Y,IntInfo[idx].Z,true) 
-- Here I do receive a error with bad argument 

Link to comment

well you're overwriting the data in the table. and you havent shown those parts (which trigger the bad argument error).

that is, of course, if your files are the same type and from the same resource. in case of different resources — you'll have to use some other way. like exported functions or events.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...