wiremod / advduplicator

Garry's Mod add-on that allows a player to save and load contraptions
http://www.wiremod.com
Apache License 2.0
67 stars 43 forks source link

Load dupe error #62

Open MStruntze opened 9 years ago

MStruntze commented 9 years ago

I and many of my players seem to be getting the following issue a lot: adv_error

AdvDupe Timer Error: lua/includes/extensions/table.lua:78: bad argument #1 to 'pairs' (table expected, got nil)
stack traceback:
    [C]: in function 'pairs'
    lua/includes/extensions/table.lua:78: in function 'Merge'
    addons/tool_advduplicator/lua/autorun/serialiser.lua:245: in function 'DeserialiseBlock' 
    addons/tool_advduplicator/lua/autorun/serialiser.lua:377: in function <addons/tool_advduplicator/lua/autorun/serialiser.lua:375>
    [C]: in function 'xpcall'
    addons/tool_advduplicator/lua/autorun/server/advdupe.lua:1767: in function 'fn'
    addons/ulib/lua/ulib/shared/hook.lua:183: in function <addons/ulib/lua/ulib/shared/hook.lua:161>
AdvDupe: Sending this ErrorMsg to Player [2][DyNATO]
AdvDupe-ERROR: "Failed Loading file" 

The only thing that's changed inside the files is the max upload limit (which is set to -1 to disable it). It's about 50/50 if the dupes load or not.

TomyLobo commented 9 years ago

ugh, screenshots of text... Also, no dupe is provided. Providing the dupe file will greatly improve the chances of getting your problem addressed.

MStruntze commented 9 years ago

Here's one which doesn't load: https://gist.github.com/MStruntze/5f84a9ac3a2e2f87b675

Jack37 commented 9 years ago

@MStruntze can you provide the file once more please? The link doesn't work anymore.

MStruntze commented 9 years ago

It seems to be an issue with newlines not being read correctly. I made a quick fix on my own version, though it could probably be written better for optimization. Here's the edited serialiser.lua file: https://gist.github.com/MStruntze/b010a0b9dd1938f5ec36

Grocel commented 8 years ago

@MStruntze: I would recommend to do a pull request for this one. Even when it is a year late. :)

MStruntze commented 8 years ago

I doubt it's the best approach to solving the issue, and I personally switched to adv. duplicator 2 instead of this.