1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Hey Guest, is it this your first time on the forums?

    Visit the Beginner's Box

    Introduce yourself, read some of the ins and outs of the community, access to useful links and information.

    Dismiss Notice

Linux "/registercommand" arguments parsing bug

Discussion in 'Archive' started by sinitreo, Apr 4, 2014.

Thread Status:
Not open for further replies.
  1. sinitreo

    sinitreo Shopkeep Stealer
    1. Zen Laboratories

    Messages:
    66
    Category: KAG Server / Administrating

    Operating system: Ubuntu 13+

    Build number: 1057

    Description:
    Telnet connection via tcpr.

    This input

    /registercommand "example_simple" "void BindFunction()" "Scripts/example_simple_bind.as" "example of simple script binding, turns all players into archers"\r\n
    Gives this output (ommiting the echo):

    [11:56:07] binding void BindFunction() from void BindFunction() Scripts/example_simple_bind.as to example_simple with usage "Scripts/example_simple_bind.as example of simple script binding, turns all players into archers "
    [11:56:07]


    It's clear from the output that arguments were parsed wrong. And ofcource, command does not work as well:

    [11:57:27] /example_simple
    [11:57:27] script command: calling void BindFunction() in Base/void BindFunction() Scripts/example_simple_bind.as
    [11:57:27] Script not found, unable to create void BindFunction() Scripts/example_simple_bind.as
    [11:57:27]


    Steps to reproduce:
    The file is not needed to reproduce the failure. However here it is http://pastebin.com/bb9aB41s

    Assuming default configuration:
    1. Start the server with sv_tcpr set to 1
    2. Via terminal: telnet localhost 50301
    3. Type in /registercommand "example_simple" "void BindFunction()" "Scripts/example_simple_bind.as" "example of simple script binding, turns all players into archers"\r\n
    4. Watch the output that does not make much sence
    5. Type in /example_simple
    6. Watch the obvious output
    Screenshots/Videos:

    UPDATE:

    Thanks to @master4523, we figured out, that command is actually registered, even though message feedback is horribly incorrect.
     
    Last edited: Apr 4, 2014
  2. master4523

    master4523 Masterful KAG Guard Global Moderator Tester
    1. PumpkinStars - [Pk#] - Inactive

    Messages:
    378
    The output message is wrong, but the command is correctly registered for me.
     
Thread Status:
Not open for further replies.