Controlled Posted August 25, 2014 Share Posted August 25, 2014 So I put a table in a shared file for both server and client to add to. When I add something to the table in server side, table[row][2] = value It doesn't return in the client side. I tried syncing it with a function in the shared file like this: Shared: function syncTables(row, value, info) if row and value and info then table[row][value] = info end end Server: syncTables(1, 2, "Hi") Client: for key, value in pairs(table) do outputDebugString(value[2]) end Client will return nil whereas the server will return "Hi" properly... Link to comment
lcd12321 Posted August 25, 2014 Share Posted August 25, 2014 maybe this value[2] replace value Link to comment
Et-win Posted August 25, 2014 Share Posted August 25, 2014 Don't give the function/table the same name as the table/function. Also, did you trigger the table to client? Link to comment
manawydan Posted August 25, 2014 Share Posted August 25, 2014 use triggerClientEvent/triggerServerEvent to send the table to another side. Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now