Jump to content

Goodguy

Member
  • Posts

    14
  • Joined

  • Last visited

Posts posted by Goodguy

  1. How does one map the buttons on a Controller through coding?

     

    Would it be something like

    A = {}
    
    function A.Pressed(_keyPressed)
    	if _keyPressed == DPadDown then
    		--Code
    	end
    end
    --Or
    function A.Pressed(_keyPressed)
    	if _keyPressed == "DPadDown" then
    		--Code
    	end
    end
    --Or is it a number?
    Events.OnKeyPressed.Add(A.Pressed)

    Edit-------

    Looked at PZ/media/lua/shared/JoyPad/JoyPadSertup.lua

  2. 1 hour ago, RoboMat said:

    The error is trying to tell you that somewhere in your code you try to call a table as a function. 

     

    So you probably have something like

    
    local foo = {};
    foo();

    in your code.  The stack trace should tell you in which file and in which line the error occured.

    So say I have something like this:

    Players = {};
    
    function Players.IsSplitscreen(_player)
    	~Code Here
    end
    
    Events.OnCreateIsoPlayer.Add(Players.IsSplitscreen);

    It gives me an error at the Events.OnCreateIsoPlayer.Add(Players.IsSplitscreen); part. And also thanks for your help!

  3. I've looked at http://lua-users.org/wiki/MetatableEvents and some other tutorial websites but can't seem to understand it. Currently I'm getting an issue that pops up as "Object table 0x1060508076 did not have __call metatable set" and cannot seem to find a solution to my issue. I know the __call event allows for the table to be used as a function but can't seem to quite understand it. If anyone has a way to explain it a bit more in-depth that would be greatly appreciated! Thank you.

  4. Just now, Hydromancerx said:

    The guy who is making the Farmoid mod was planning on merging those mods. When that happens i will update Farmoid in Hydrocraft.

    OK, thank you.

  5. Anyone know if it is possible to have an Irrigation system with the mods of Hydrocraft? I know Drip Irrigation used to be a great mod, but it hasn't been updated.

×
×
  • Create New...