Jump to content

Sledgehammer won't unequip using mods...


apelikejay

Recommended Posts

I am working on a Mod compilation with my own additions... I am currently using the following mods from other coders:

 

DryTowels,

WaterPipes,

SprayPaint,

reloading

 

And both maps: Dreadwood and Bedford...

 

One of these is causing issues with "dismantle" and "destroy" functions for both the Axe and Sledgehammer... after doing either of these functions on ingame structures, whether created by myself or by the game code, you cannot unequip the Axe or Sledgehammer or equip anything else to replace them... the entire game must be shut down and reloaded to unequip...

 

Does anyone know what could be causing this from those mods?

 

I examined fairly thouroughly and it doesn't appear to be the DryTowels or Reloading mods...

 

Thanks again...

Link to comment
Share on other sites

Thank you, RoboMat, for the quick reply... I just fired up the server and performed a destroy on a box that had been in my way... the following is what the console.txt file spit out when I did it...

 

ALARMS: 143/1959 buildings have alarms
game loading took 23 seconds
STATE: exit zombie.gameStates.GameLoadingState
1 players found
player 0 is mouse
PLAYER DATA OFFSET 0
465.5
0
465.5
328.6666666666667
table 0x118605412
closure 0x536335068
Player 0
loot inv created
table 0x1848199707
closure 0x536335068
loot all visible
context menu created
context menu initialised
context menu added
0
0
STATE: enter zombie.gameStates.IngameState
Disconnected/Distant player Bob in CurrentCell.getObjectList() removed
Player Connect received for player ape id 0 (me)
no pipe on right click
no barrel on right click
-----------------------------------------
STACK TRACE
-----------------------------------------
function: perform -- file: ISDestroyStuffAction.lua line # 83
Object tried to call nil in perform-----------------------------------------
STACK TRACE
-----------------------------------------
function: perform -- file: ISDestroyStuffAction.lua line # 83

 

 

 

 

I am not sure if this is the crashlog you speak of... if not can you give me a location to find the actual crashlog? This is everything that was created by the log from the moment I logged in to a minute later when I destroyed the box and couldn't unequip... Thanks again...

Link to comment
Share on other sites

Yes ... stack trace was the word I was looking for :D

 

It shows you where it fails:

function: perform -- file: ISDestroyStuffAction.lua line # 83

 

This means, in the file "ISDestroyStuffAction.lua" in the function "perform()" on line #83 Project Zomboid encountered an issue.

 

Object tried to call nil in perform

This means that the thing you are trying to call on line 83 hasn't been created yet, or is no longer there (Lua uses nil to tell you that there isn't a useful value). Obviously I can't really help you with it, but I suggest that you find out which object throws the nil-error and then try to find out why the value is nil when it actually shouldn't be.

Link to comment
Share on other sites

Thanks to you I think I've narrowed it down... line 83 in the IsDestroyStuffAction.lua:

 

    RainCollectorBarrel.OnDestroyIsoThumpable(self.item, nil)

 

 

...directly calls from the mod file "RainCollectorBarrel.lua" which appears to be part of the waterpipe's mod... the function it calls is as follows:

 

-- properly remove the barrel from the world
function RainCollectorBarrel.removeBarrel(thump)
    if thump and thump:getName() == "Rain Collector Barrel" then
        local sq = thump:getSquare();
        if sq then
            local pos = nil;
            for i=1, #RainCollectorBarrel.barrels do
                if RainCollectorBarrel.barrels.x == sq:getX() and RainCollectorBarrel.barrels.y == sq:getY() and RainCollectorBarrel.barrels.z == sq:getZ() then
                    table.remove(RainCollectorBarrel.barrels, i)
                    break
                end
            end
            for i=1, #RainCollectorBarrel.modData.rcbarrel.barrels do
                if RainCollectorBarrel.modData.rcbarrel.barrels.x == sq:getX() and RainCollectorBarrel.modData.rcbarrel.barrels.y == sq:getY() and RainCollectorBarrel.modData.rcbarrel.barrels.z == sq:getZ() then
                    table.remove(RainCollectorBarrel.modData.rcbarrel.barrels, i)
                    break
                end
            end
        end
    end
end

Events.OnDestroyIsoThumpable.Add(RainCollectorBarrel.removeBarrel);

 

 

I know just enough reverse engineering code to cause problems but not enough to easily figure this out... if this helps, thanks... if not I'll keep staring at it until it makes sense... my reverse engineering method... thanks again.

Link to comment
Share on other sites

Apparently it's deeper than the mod issue... the code from "RainCollectionBarrel" quoted above does not appear to be changed at all from the orignal default code for that file.

 

It must originate from a different file in the mod, something that helps define the parameters of the mod's overwrite of the original code... still looking... deeper...

Link to comment
Share on other sites

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
×
×
  • Create New...