Page 2 of 5 FirstFirst 1234 ... LastLast
Results 11 to 20 of 50

Thread: CodeCallback_PlayerCommand(args) does not work

  1. #11
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    Quote Originally Posted by suck000 View Post
    Well , i have 2 iwd mods placed on main , they could affect ?
    As I told you, word for word, in the post right above this one, it COULD affect your shit IF the iwd files contain the _callbacksetup.gsc file which will overwrite the ones outside the iwd files.

    Given your response, i feel you have not checked this (and maybe do not know how to check this), and should maybe try some easier mods first before you go into libcod.
    "Does not work" is an error report for a bug between keyboard and chair.

    All hail Artie Effem

  2. The Following User Says Thank You to IzNoGoD For This Useful Post:

    YuriJurek (19th March 2016)

  3. #12
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    Also, please stop spamming my over PM about your problems. As mentioned before, the world doesnt revolve around you getting your answer within 10 minutes.



    On a more on-topic note: why are you doing
    Code:
    kick2(args[2], kickmsg);
    when kick2 takes an int and a string as arguments? This will most likely be the cause of your crash, which you might have been able to tell us if you followed the following procedure:
    https://killtube.org/showthread.php?...sking-for-help

    which is a sticky thread in this very subforum.
    "Does not work" is an error report for a bug between keyboard and chair.

    All hail Artie Effem

  4. The Following User Says Thank You to IzNoGoD For This Useful Post:

    suck000 (19th March 2016)

  5. #13
    Private First Class
    Join Date
    Mar 2016
    Posts
    134
    Thanks
    48
    Thanked 11 Times in 10 Posts
    OK !

    I don't have libcod istalled , i use this : tmux new-session -d -s codserver "./cod2 +set fs_game mod +exec server.cfg"

    I pasted the .gsc file directly to moddir/maps/mp/gametypes.

    I tried to test it , did not work !

    My question is : HOW I MAKE THAT SCRIPT WORKS

    WHAT IS LIBCOD ?

    WHY I HAVE TO INSTALL IT , HOW TO INSTALL IT (STEP BY STEP)

    HOW TO START MY COD2 SERVER WITH THIS LIBCOD AND MAKE MY SCRIPT WORK

    I think it is CLEAR now. Thank you.

    EDIT : Dude i didn't write that script. I got it from a friend ok ? Idk anything on scripting , idk how to do a code either.

  6. #14
    Private Whiskas's Avatar
    Join Date
    Jan 2015
    Posts
    84
    Thanks
    69
    Thanked 20 Times in 17 Posts
    Quote Originally Posted by IzNoGoD View Post
    Also, please stop spamming my over PM about your problems. As mentioned before, the world doesnt revolve around you getting your answer within 10 minutes.



    On a more on-topic note: why are you doing
    Code:
    kick2(args[2], kickmsg);
    when kick2 takes an int and a string as arguments?
    Few lines above
    Code:
    args[2] = int(args[2]);

  7. #15
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    Quote Originally Posted by suck000 View Post
    OK !

    I don't have libcod istalled , i use this : tmux new-session -d -s codserver "./cod2 +set fs_game mod +exec server.cfg"

    I pasted the .gsc file directly to moddir/maps/mp/gametypes.

    I tried to test it , did not work !

    My question is : HOW I MAKE THAT SCRIPT WORKS

    WHAT IS LIBCOD ?

    WHY I HAVE TO INSTALL IT , HOW TO INSTALL IT (STEP BY STEP)

    HOW TO START MY COD2 SERVER WITH THIS LIBCOD AND MAKE MY SCRIPT WORK

    I think it is CLEAR now. Thank you.

    EDIT : Dude i didn't write that script. I got it from a friend ok ? Idk anything on scripting , idk how to do a code either.

    You still didnt provide
    1) you have libcod installed properly
    2) which version of libcod you have installed
    3) does your libcod version match your cod version
    4) which mods you are running
    5) what script files are inside those mods
    6) what error your server crashes with

    1-2-3 seems to be somewhat answerred, by the fact that you provided your startup line, which doesnt seem to contain any libcod-related stuff

    So why are you saying that your friend installed libcod? Very confusing

    Also, using this script without having libcod installed will result in a crash, as stock cod2 does not know how to handle the kick2() function.

    Moreover, you have been provided with a how-to-install-libcod on multiple occasions (1. there's a link to the github on the main page of this forum 2. kung posted a link to that github in this topic 3. i sent you a PM containing a "how to install libcod on ubuntu 14.04" tutorial)

    So please, put in some effort, and dont expect us to magically fix your problems when you do not even have the right equipment for this shit.

    It's like asking us "why cant i dig a tunnel with this shovel" while standing on solid rock.
    "Does not work" is an error report for a bug between keyboard and chair.

    All hail Artie Effem

  8. The Following User Says Thank You to IzNoGoD For This Useful Post:

    YuriJurek (19th March 2016)

  9. #16
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    Quote Originally Posted by suck000 View Post
    OK !

    I don't have libcod istalled , i use this : tmux new-session -d -s codserver "./cod2 +set fs_game mod +exec server.cfg"
    This doesnt contain any libcod info
    I pasted the .gsc file directly to moddir/maps/mp/gametypes.
    yes, thats where it should go
    I tried to test it , did not work !
    with what error did it crash

    My question is : HOW I MAKE THAT SCRIPT WORKS
    probably install libcod + apply the fix wiskas extracted from my rage-comment
    WHAT IS LIBCOD ?
    to quote the github you've been provided a link to:
    Code:
    The Call of Duty extension libcod is adding new server-side functions to:
    
        Call Of Duty 2 1.2
        Call Of Duty 2 1.3
        Call Of Duty 4 1.7
    WHY I HAVE TO INSTALL IT
    well, to, again, quote the github:
    Code:
    The Call of Duty extension libcod is adding new server-side functions to:
    
        Call Of Duty 2 1.2
        Call Of Duty 2 1.3
        Call Of Duty 4 1.7
    , HOW TO INSTALL IT (STEP BY STEP)
    from the github:
    Code:
    Requirements:
    
    dpkg --add-architecture i386
    apt-get update
    apt-get install gcc-multilib
    apt-get install libmysqlclient-dev:i386
    apt-get install g++-multilib
    
    Precompiled shared libraries: http://killtube.org/downloads/libcod/
    
    Starting the server:
    
    LD_PRELOAD=libcod2_1_3_nomysql.so ./cod2_lnxded +set fs_game ...
    
    Some enviroments need LD_LIBRARY_PATH also:
    
    LD_LIBRARY_PATH=. LD_PRELOAD=libcod2_1_3_nomysql.so ./cod2_lnxded +set fs_game ...
    or from my tutorial which i sent you by pm:
    Quote Originally Posted by IzNoGoD View Post
    Step 4 (optional): Installing libcod prerequisites
    As copied from the libcod github:
    Code:
    sudo apt-get -y install gcc-multilib
    sudo apt-get -y install libmysqlclient-dev:i386
    sudo apt-get -y install g++-multilib
    I've tried installing these all in one command, but that failed for some unknown reasons. So just keep these as separate commands.

    Step 5 (optional): compiling libcod from source
    In order to compile libcod, you first need to obtain the source code. There are currently multiple libcod versions out there:
    Kung foo man's original version
    Mitch's version which is a bit more experimental and has a few more features than the original version
    Php's version has a few nice functions but seems to be out-of-date
    voron00's version which seems to be the best maintained version currently

    To obtain the code, either download the source from github and upload, or
    Code:
    sudo apt-get install git
    git clone [github url here]
    You can then easily compile the stuff with
    Code:
    ./doit.sh clean
    ./doit.sh base
    ./doit.sh cod2_1_3
    For different cod versions, change the last line.
    The final product (the actual libcod "executable") is then inside the bin folder as libcod2_1_3.so
    HOW TO START MY COD2 SERVER WITH THIS LIBCOD
    from the tutorial in the pm:
    Quote Originally Posted by IzNoGoD View Post
    Step 7 (optional): Starting your CoD2 server with libcod
    Requires a few small edits to your .sh file:
    Code:
    #!/bin/bash
    
    sv_maxclients="32"
    fs_game="your_mod_folder_here"
    fs_homepath="/home/USER_HERE/YOUR_COD_DIR"
    cod="/full/path/to/cod2_1_3_lnxded"
    com_hunkMegs="256"
    config="configfile.cfg"
    cracked="1"
    net_port="28960"
    
    
    args=\
    "+set fs_homepath \"$fs_homepath\" "\
    "+set sv_cracked $cracked "\
    "+set fs_game $fs_game "\
    "+set net_port $net_port "\
    "+set com_hunkMegs $com_hunkMegs "\
    "+set sv_maxclients $sv_maxclients "\
    "+set fs_basepath \"$fs_homepath\" "\
    "+exec $config"
    
    LD_PRELOAD="relative/path/to/libcod2_1_3.so" $cod $args +set g_gametype tdm +map mp_toujane
    AND MAKE MY SCRIPT WORK
    add the fixes by wiskas.

    I think it is CLEAR now. Thank you.
    I agree it's very clear on how to do this.
    EDIT : Dude i didn't write that script. I got it from a friend ok ?
    Maybe ask your friend to fix the script he wrote, instead of complaining about a third-party forum not instantly helping you, chewing all the bits for you and helping you swallow.
    Idk anything on scripting , idk how to do a code either.
    maybe this is not for you then...
    "Does not work" is an error report for a bug between keyboard and chair.

    All hail Artie Effem

  10. #17
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    whiskas just told me that the line he quoted isnt a fix: its already in the code.

    So the crash is most likely caused by you using the kick2() command without having libcod installed

    Note: changing it to kick() wont help you. Although it stops the code from crashing, there is no way for the code to be called without libcod installed.
    "Does not work" is an error report for a bug between keyboard and chair.

    All hail Artie Effem

  11. #18
    Private First Class
    Join Date
    Mar 2016
    Posts
    134
    Thanks
    48
    Thanked 11 Times in 10 Posts
    I installed libcod and i have a problem , i am stuck at step 6.
    I started cod2 server with libcod and everything ok. But how i'll keep it running ??? Any commands for that ? i tried screen didn't work i think.
    screen command is for server without libcod. But mine is with , what to do ? If tmux command is running can you give me how to write it ?

  12. #19
    Corporal voron00's Avatar
    Join Date
    Nov 2014
    Posts
    248
    Thanks
    64
    Thanked 216 Times in 116 Posts
    Quote Originally Posted by suck000 View Post
    I installed libcod and i have a problem , i am stuck at step 6.
    I started cod2 server with libcod and everything ok. But how i'll keep it running ??? Any commands for that ? i tried screen didn't work i think.
    screen command is for server without libcod. But mine is with , what to do ? If tmux command is running can you give me how to write it ?
    The easiest way is proably to create a simple shell script (name it 'myserver.sh'), put in your cod2 dir and then launch it from the screen e.g 'screen sh myserver.sh'

    PHP Code:
    #!/bin/bash

    export LD_PRELOAD="$HOME/cod2_1_0/libcod2_1_0.so" # Point to your lib

    PARAMS="+set fs_game myserver +set dedicated 2 +set net_port 28960 +exec config.cfg" # Your server launch options

    "./cod2_lnxded" "$PARAMS"

    exit 
    sudo apt-get rekt

  13. The Following User Says Thank You to voron00 For This Useful Post:

    suck000 (19th March 2016)

  14. #20
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    Read the tutorial again, it explains EXACTLY how to run a file in screen in step 6.
    In step 7 it lists some changes to your .sh file in order to add libcod. THIS DOES NOT MAKE THE SCREEN COMMANDS IN STEP 6 INVALID.

    And
    i tried screen didn't work i think.
    is by far the worst bug report i've seen in my life.
    "Does not work" is an error report for a bug between keyboard and chair.

    All hail Artie Effem

  15. The Following 3 Users Say Thank You to IzNoGoD For This Useful Post:

    kung foo man (19th March 2016),suck000 (19th March 2016),YuriJurek (19th March 2016)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •