Page 3 of 4 FirstFirst 1234 LastLast
Results 21 to 30 of 35

Thread: No .so created

  1. #21
    Brigadier General
    Join Date
    Dec 2012
    Posts
    1,012
    Thanks
    440
    Thanked 171 Times in 132 Posts
    I compiled the .so now using filthyfreaks files
    http://killtube.org/showthread.php?2...ll=1#post12104

    It results in a .so files with no segmentation fault. However, when I start a server, it says
    Code:
    ******* script compile error *******
    unknown function: (file 'maps/mp/gametypes/_weapons.gsc', line 1080)
        return setweaponfiretime(id, time);
    Code:
    loadWeaponInfo(i, array)
    {
        array.id = i;
        array.dmg = getweapondamage(i); // store baseline
        array.meleedmg = getweaponmeleedamage(i); // in case you want to restore old value
        
        if(i >= 64) // no viewmodels after 64th weapon
            array.bugged = 1;
    }
    
    getWeaponArray(weapon)
    {
        if(isDefined(level.weapons[weapon]) && isDefined(level.weapons[weapon].id))
            return level.weapons[weapon];
        else if(isDefined(level.otherweapons[weapon]) && isDefined(level.otherweapons[weapon].id))
            return level.otherweapons[weapon];
        else
            return undefined;
    }
    
    updateWepDamage(weapon, dmg)
    {
        array = getWeaponArray(weapon);
        if(isDefined(array))
            array.dmg = dmg;
    }
    
    updateWepMeleeDamage(weapon, dmg)
    {
        array = getWeaponArray(weapon);
        if(isDefined(array))
            array.meleedmg = dmg;
    }
    
    getWeaponId(weapon)
    {
        if(isDefined(level.weapons[weapon]) && isDefined(level.weapons[weapon].id))
            return level.weapons[weapon].id;
        else if(isDefined(level.otherweapons[weapon]) && isDefined(level.otherweapons[weapon].id))
            return level.otherweapons[weapon].id;
        else
            return -1;
    }
    
    WeaponMaxAmmo(weapon)
    {
        id = getWeaponId(weapon);
        if(id == -1)
            return 0;
        
        return getweaponmaxammo(id);
    }
    
    WeaponDamage(weapon)
    {
        id = getWeaponId(weapon);
        if(id == -1)
            return 0;
        
        return getweapondamage(id);
    }
    
    WeaponMeleeDamage(weapon)
    {
        id = getWeaponId(weapon);
        if(id == -1)
            return 0;
        
        return getweaponmeleedamage(id);
    }
    
    setWepDamage(weapon, dmg, isdefault)
    {
        id = getWeaponId(weapon);
        if(id == -1)
            return 0;
        
        if(isDefined(isdefault) && isdefault)
            updateWepDamage(weapon, dmg);
        
        return setweapondamage(id, dmg);
    }
    
    setWepMeleeDamage(weapon, dmg, isdefault)
    {
        id = getWeaponId(weapon);
        if(id == -1)
            return 0;
        
        if(isDefined(isdefault) && isdefault)
            updateWepMeleeDamage(weapon, dmg);
        
        return setweaponmeleedamage(id, dmg);
    } 
    
    WeaponFireTime(weapon)
    {
        id = getWeaponId(weapon);
        if(id == -1)
            return 0;
        
        return getweaponfiretime(id);
    }
    
    setWepFireTime(weapon, time)
    {
        id = getWeaponId(weapon);
        if(id == -1)
            return 0;
        
        return setweaponfiretime(id, time);
    }
    Added to _weapons.gsc

    Must I load or precache this script somewhere?

    And in gsc.cpp I found this
    Code:
    	{"getweaponfiretime"              , gsc_utils_getweaponfiretime           , 0},
    	{"setweaponfiretime"              , gsc_utils_setweaponfiretime           , 0},
    So it should work right? Or am I missing something obvious
    Last edited by Ni3ls; 10th November 2015 at 09:42.

  2. #22
    Brigadier General
    Join Date
    Dec 2012
    Posts
    1,012
    Thanks
    440
    Thanked 171 Times in 132 Posts
    Ok it gave me the error, because it didnt preload the libcod.so .... I thought it did.
    Now preloading it will give me again segmentation fault.
    Can somebody maybe compile filthyfreaks libcod version for me?
    Last edited by Ni3ls; 10th November 2015 at 18:17.

  3. #23
    Global Mossaderator Mitch's Avatar
    Join Date
    Nov 2012
    Posts
    654
    Thanks
    204
    Thanked 450 Times in 305 Posts
    This should make it easier to compile without mysql.

    Add the following code to doit.sh
    PHP Code:
    if [ "$2" == "no_mysql" ]; then
        mysql_config
    =""
        
    mysql_link=""
    fi 
    After
    PHP Code:
    if [ -"./vendors/lib" ]; then
        mysql_config
    =""
        
    mysql_link="-lmysqlclient -L./vendors/lib"
    fi 
    Now run
    PHP Code:
    ./doit.sh base
    ./doit.sh cod2_1_0 no_mysql 

  4. The Following 2 Users Say Thank You to Mitch For This Useful Post:

    kung foo man (11th November 2015),Ni3ls (11th November 2015)

  5. #24
    Brigadier General
    Join Date
    Dec 2012
    Posts
    1,012
    Thanks
    440
    Thanked 171 Times in 132 Posts
    Again error
    Code:
    > [INFO] Compiled for: CoD2 1.0
    Compiled: Nov 11 2015 09:21:24
    > [INFO] value of closer=08111d32
    > [INFO] value of download=0808e508
    ./starttest2: line 1: 26998 Segmentation fault
    with dmesg
    Code:
    cod2_lnxded_1_0[9742]: segfault at 0 ip 0000000000a6bf1d sp 00000000ffd68e58 error 6 in libc-2.12.so[934000+190000]
    cod2_lnxded_1_0[24555]: segfault at 0 ip 0000000000a6bf1d sp 00000000ffcd6958 error 6 in libc-2.12.so[934000+190000]
    cod2_lnxded[31179]: segfault at 0 ip 0000000000a6bf1d sp 00000000ffb3a1c8 error 6 in libc-2.12.so[934000+190000]
    UDP: short packet: From 92.16.25.123:28960 2358/55 to 46.4.55.66:29957
    cod2_lnxded[26436]: segfault at 0 ip 0000000000a6bf1d sp 00000000ff9850d8 error 6 in libc-2.12.so[934000+190000]
    cod2_lnxded[27812]: segfault at 0 ip 0000000000a6bf1d sp 00000000ffef18d8 error 6 in libc-2.12.so[934000+190000]
    cod2_lnxded[26998]: segfault at 0 ip 0000000000a6bf1d sp 00000000ffdfcb98 error 6 in libc-2.12.so[934000+190000]

  6. #25
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    are you sure you're running the correct cod2 1.0 version?
    "Does not work" is an error report for a bug between keyboard and chair.

    All hail Artie Effem

  7. #26
    Brigadier General
    Join Date
    Dec 2012
    Posts
    1,012
    Thanks
    440
    Thanked 171 Times in 132 Posts
    Yes without libcod server runs fine

  8. #27
    Assadministrator kung foo man's Avatar
    Join Date
    Jun 2012
    Location
    trailerpark
    Posts
    2,011
    Thanks
    2,102
    Thanked 1,084 Times in 753 Posts
    Since the crash was in libc (as the dmesg msg suggests) it could be a libc version conflict. I would try to build libcod against some old version.

    If you would make me a ssh test account, I could try it out when I have time
    timescale 0.01

  9. #28
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    Not what i meant.

    Are you sure you're running the server file for which libcod was built?
    "Does not work" is an error report for a bug between keyboard and chair.

    All hail Artie Effem

  10. #29
    Brigadier General
    Join Date
    Dec 2012
    Posts
    1,012
    Thanks
    440
    Thanked 171 Times in 132 Posts
    What do you mean Izno?

    My server is running 1.0 and i compile against 1.0
    In attachment i have my .so

    @kung

    Which old version do you suggest?
    Attached Files Attached Files

  11. #30
    Private First Class YuriJurek's Avatar
    Join Date
    Jun 2013
    Posts
    219
    Thanks
    152
    Thanked 88 Times in 47 Posts
    As far as I am aware there is the stock server executable namely 1.0a and 1.0 (1.0a is just 1.0 with a few hotfixes), and there are also cracked executables, try and see if changing the executable file works.

    Edit: By executable I mean the 'lnxded' file.

  12. The Following User Says Thank You to YuriJurek For This Useful Post:

    Ni3ls (12th November 2015)

Posting Permissions

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