Results 1 to 6 of 6

Thread: Libcod

  1. #1
    ... connecting
    Join Date
    Mar 2019
    Posts
    9
    Thanks
    2
    Thanked 1 Time in 1 Post

    Libcod

    Hello again, sorry for spamming, but I've got a problem while running my server with libcod


    PHP Code:
     #!/bin/bash

    sv_maxclients="24"
    fs_game="sdpammode"
    fs_homepath="/root/cod2"
    cod="/root/cod2/cod2_lnxded"
    com_hunkMegs="256"
    config="server.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="/root/libcod/bin/libcod2_1_3.so" $cod $args +set g_gametype sd +map mp_toujane 

    I've saved that as a .sh file and added it to " /root "

    so, after I try to run it, an error appears

    Code:
    ./server.sh: line 2: $'\r': command not found
    ./server.sh: line 11: $'\r': command not found
    ./server.sh: line 12: $'\r': command not found
    : No such file or directoryfs_homepath "/root/cod2
    ./server.sh: line 15: $'+set sv_cracked 1\r \r': command not found
    ./server.sh: line 16: $'+set fs_game sd_polat_bigjump\r \r': command not found
    ./server.sh: line 17: $'+set net_port 28960\r \r': command not found
    ./server.sh: line 18: $'+set com_hunkMegs 256\r \r': command not found
    ./server.sh: line 19: $'+set sv_maxclients 24\r \r': command not found
    : No such file or directoryfs_basepath "/root/cod2
    ./server.sh: line 21: $'+exec 1qaz.cfg\r\r': command not found
    ./server.sh: line 22: $'\r': command not found
    : No such file or directory/cod2/cod2_lnxded

    Please, help me to solve this problem! I need libcod for my server

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

    kung foo man (26th March 2019)

  3. #2
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,576
    Thanks
    17
    Thanked 923 Times in 575 Posts
    Dont edit your .sh file on windows, it adds a \r\n at the end of each line, whereas linux expects a \n only.
    "Does not work" is an error report for a bug between keyboard and chair.

    All hail Artie Effem

    Sending me a private message makes me want to help you LESS.

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

    nerdiiii (25th March 2019)

  5. #3
    ... connecting
    Join Date
    Mar 2019
    Posts
    9
    Thanks
    2
    Thanked 1 Time in 1 Post
    I tried to do it through
    Code:
    nano run.sh
    and edited it, but it shows the same error

  6. #4
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,576
    Thanks
    17
    Thanked 923 Times in 575 Posts
    Quote Originally Posted by nerdiiii View Post
    I tried to do it through
    Code:
    nano run.sh
    and edited it, but it shows the same error
    delete the line ends in nano, then add them back in. It should fix up the errors you're seeing.
    "Does not work" is an error report for a bug between keyboard and chair.

    All hail Artie Effem

    Sending me a private message makes me want to help you LESS.

  7. The Following 2 Users Say Thank You to IzNoGoD For This Useful Post:

    kung foo man (26th March 2019),nerdiiii (25th March 2019)

  8. #5
    ... connecting
    Join Date
    Mar 2019
    Posts
    9
    Thanks
    2
    Thanked 1 Time in 1 Post
    Thank you so much man! it's working

  9. #6
    Sergeant maxdamage99's Avatar
    Join Date
    Aug 2014
    Location
    Russia
    Posts
    373
    Thanks
    74
    Thanked 86 Times in 72 Posts
    Quote Originally Posted by IzNoGoD View Post
    Dont edit your .sh file on windows, it adds a \r\n at the end of each line, whereas linux expects a \n only.
    i think dos2unix cant fix it
    write shit code's

Posting Permissions

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