Fjörgynn Posted November 20, 2015 Share Posted November 20, 2015 Like in title, in multiplayer mode spikelog barricades are instantly disappearing when placed, and error popup in console window about bugged line #28 in file HCBarricadeAction.lua. They do exist tho, cause after placing invisible wall is created (zombies are attacking it too) and dead zombie body texture on the floor (cannot grab it, I suppose it's bug related). In single player mode mod is working fine. Here's the code (all file), maybe someone had same issue before. Thank you in advance for any help / suggestions and sorry if I misplaced my post, I'm new around. http://s13.postimg.org/hi6okyehz/zombo.jpg [spoiler][code]require "TimedActions/ISBaseTimedAction"ISAddBarricadeAction = ISBaseTimedAction:derive("ISAddBarricadeAction");function ISAddBarricadeAction:isValid() return true;endfunction ISAddBarricadeAction:update() self.item:setJobDelta(self:getJobDelta());endfunction ISAddBarricadeAction:start() self.item:setJobType("placeBarricade"); self.item:setJobDelta(0.0);endfunction ISAddBarricadeAction:stop() ISBaseTimedAction.stop(self); self.item:setJobDelta(0.0);endfunction ISAddBarricadeAction:perform() self.item:getContainer():setDrawDirty(true); self.item:setJobDelta(0.0); self.character:getInventory():Remove("HCLogbarrier"); if isClient() then local args = {x = self.sq:getX(), y = self.sq.getY(), z = self.sq.getZ(), sprite = self.sprite}; sendClientCommand(self.character, 'Hydrocraft', 'placeBarricade', args); else HCPlaceItem.placeBarricade(self.sq, self.sprite); end ISBaseTimedAction.perform(self);endfunction ISAddBarricadeAction:new(character, sq, item, sprite, time) local o = {}; setmetatable(o, self); self.__index = self; o.character = character; o.item = item; o.stopOnWalk = true; o.stopOnRun = true; o.maxTime = time; o.sprite = sprite; o.sq = sq; return o;end[/code][/spoiler] Link to comment Share on other sites More sharing options...
ethanwdp Posted November 20, 2015 Share Posted November 20, 2015 What's the error itself? Link to comment Share on other sites More sharing options...
Fjörgynn Posted November 20, 2015 Author Share Posted November 20, 2015 function error: perform -- file: HCBarricadeAction.lua line # 28bugged action, cleared queue it shows only on client side. no errors on server side occurs. Link to comment Share on other sites More sharing options...
ethanwdp Posted November 20, 2015 Share Posted November 20, 2015 local args = {x = self.sq:getX(), y = self.sq.getY(), z = self.sq.getZ(), sprite = self.sprite}; self.sq:getX() uses a colon, but the rest use a dot. It's the only thing I see that looks a bit odd in the code. Link to comment Share on other sites More sharing options...
Fjörgynn Posted November 20, 2015 Author Share Posted November 20, 2015 I was thinking same, so tried both - all arguments with dot / colon but it didn't worked :/ Link to comment Share on other sites More sharing options...
ethanwdp Posted November 20, 2015 Share Posted November 20, 2015 I was thinking same, so tried both - all arguments with dot / colon but it didn't worked :/Odd.You might want to report this to Hydromancer. Link to comment Share on other sites More sharing options...
Fjörgynn Posted November 20, 2015 Author Share Posted November 20, 2015 Here's how it looks: http://s13.postimg.org/hi6okyehz/zombo.jpg Link to comment Share on other sites More sharing options...
fluffe9911 Posted November 20, 2015 Share Posted November 20, 2015 He already knows lol but everything lua is done by his lua guy and atm he has no idea how to fix it lolAlso Mr Insane knows what's wrong pretty sure. Link to comment Share on other sites More sharing options...
Fjörgynn Posted November 20, 2015 Author Share Posted November 20, 2015 waaah Link to comment Share on other sites More sharing options...
ethanwdp Posted November 20, 2015 Share Posted November 20, 2015 Well, if it's physically there but appearance wise isn't, then it's most likely an issue with the sprite.Syntax wise everything seems okay, but I'm not familiar with the arguments that sendClientCommand() takes. From the source code... sendClientCommand(IsoPlayer player, String module, String command, KahluaTable args) How Hydrocraft calls it... sendClientCommand(self.character, 'Hydrocraft', 'placeBarricade', args); Seems correct to me. However, I'm not sure what defines commands. So, more code stalking. After some more code stalking, I came across a function called by the OnClientCommand function. function HCPlaceItem.OnClientCommand(module, command, player, args) if module ~= 'Hydrocraft' then return end if command == 'placeBarricade' then local gs = getCell():getGridSquare(args.x, args.y, args.z); if gs then HCPlaceItem.placeBarricade(gs, args.sprite); end elseif command == 'placeStonePillar' then local gs = getCell():getGridSquare(args.x, args.y, args.z); if gs then HCPlaceItem.placeStonePillar(gs, args.sprite); end endend Now that I'm in more familiar territory, I'll double check with my Cheat Menu mod to see how I placed items, and see if Hydrocraft does anything differently. local cell = getWorld():getCell(); local sq = cell:getGridSquare(wx, wy, wz); I define the cell variable as getWorld():getCell(), and then call it later. Hydrocraft calls getCell() directly, but does not call getWorld().Could this be the issue? Link to comment Share on other sites More sharing options...
EnigmaGrey Posted November 20, 2015 Share Posted November 20, 2015 They also throw errors on the server-side console . . . Will get it later. Link to comment Share on other sites More sharing options...
ethanwdp Posted November 20, 2015 Share Posted November 20, 2015 They also throw errors on the server-side console . . . Will get it later.Mind sharing the log?Really curious as of what's wrong. Code looks fine, everything seems normal, but it inexplicably fails to load the sprite despite having it defined, even though the sprite works fine on singleplayer. Link to comment Share on other sites More sharing options...
Fjörgynn Posted November 20, 2015 Author Share Posted November 20, 2015 Well, if it's physically there but appearance wise isn't, then it's most likely an issue with the sprite.Syntax wise everything seems okay, but I'm not familiar with the arguments that sendClientCommand() takes. Yup, I was reading a bit, trying to dig deeper but without any results. Syntax seems to be ok, yet it isn't. That's why I've posted issue here - I'm out of ideas. Link to comment Share on other sites More sharing options...
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