[SCRIPT] Zcript (Admin tools)

  • Yeah the script is throwing errors and kicks the client

    Code
    server/scripts/Zcript/script.lua:287 bad argument: userdata expected, got number


    Somthing seems to be wrong with target.setPlayerHunger(100);



    Edit: Got it.
    problem was dots and colons ;)


    It works this way:
    [lua]function heal(target)
    local tName = target:getPlayerName()
    target:setPlayerHealth(100);
    target:setPlayerHunger(100);
    target:setPlayerThirst(100);
    target:sendTextMessage("You've been healed !")
    end[/lua]

  • Moin,
    first a thank you for that nice script. Helps me a lot...


    Yesterday i was downloading the script from Github and testing it on a single player game with the RW version 0.5.3.1 (Steam)


    Everytime, when i enter the command /ahelp there pop up an error:


  • Ok, got it - thx :)


    But still the same error message. Now i was using my second computer as RW server (LAN).
    New Server installation and fresh downloaded script.


    The error message in the DOS BOX (Server):




    Zabka: thx and take your time ;)

  • Same problem as before.
    Edit the Script line 55 from
    [lua]event.player.sendTextMessage("[#00FFCC]/heal [#00CC88] <player ID or name>");[/lua]


    to:


    [lua]event.player:sendTextMessage("[#00FFCC]/heal [#00CC88] <player ID or name>");[/lua]

Participate now!

Don’t have an account yet? Create a new account now and be part of our community!