-
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
-
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?
-
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 [ -d "./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
-
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]
-
are you sure you're running the correct cod2 1.0 version?
-
Yes without libcod server runs fine
-
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
-
Not what i meant.
Are you sure you're running the server file for which libcod was built?
-
1 Attachment(s)
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?
-
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.