horrible90 Posted September 3, 2020 Share Posted September 3, 2020 i want to access, and reset a table/array in another prefab from another mod. The table only exists in the prefab file, and is local. There is no function implemented originally that removes stuff from the table, only adding stuff. I am attempting to make the change using addprefabpostinit. Im failing with a simple "Table = newTable" and i presume its because you cant access a local variable from outside the original file. Is there a way i can achieve what i want? Link to comment Share on other sites More sharing options...
Nappy Posted September 23, 2020 Share Posted September 23, 2020 If the table is a fixed table that does not vary the number of items inside, have you tried table.remove(TableName, LineNumber)? Link to comment Share on other sites More sharing options...
penguin0616 Posted September 24, 2020 Share Posted September 24, 2020 @horrible90 You'll need the debug library to do so. Check the section on upvalues. https://www.lua.org/pil/23.html Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.
Please be aware that the content of this thread may be outdated and no longer applicable.