-
Set it to:
Code:
export LD_LIBRARY_PATH="/home/cod4/server/libs:/home/cod4/server/libs/mysql"
export LD_PRELOAD="/home/cod4/server/libs/libcod4_1_7.so"
cd /home/cod4/server
./cod4_lnxded-bin +set dedicated "2" +set net_port "28961" +set fs_basepath "/home/cod4/server" +set fs_homepath "/home/cod4/server" +set fs_game "mods/nl_zom" +exec zom.cfg +map_rotate
Still nothing...
-
Any LD warning? Post the output
-
-
There is nothing in the log file, I need the Putty output ala:
Code:
k_deathrun@Debian-70-wheezy-64-LAMP:~$ ./server_zombots.sh
> [WARNING] Compiled for: 210
Compiled: Sep 17 2013 23:08:19
> [INFO] value of closer=08111d32
> [PLUGIN LOADED]
CoD2 MP 1.0 build linux-i386 Oct 24 2005
----- FS_Startup -----
Current search path:
/home/k_deathrun/zombots
/home/k_deathrun/main/iw_14.iwd (4038 files)
/home/k_deathrun/main/iw_13.iwd (22624 files)
/home/k_deathrun/main/iw_12.iwd (1016 files)
/home/k_deathrun/main/iw_11.iwd (1462 files)
/home/k_deathrun/main/iw_10.iwd (1936 files)
/home/k_deathrun/main/iw_09.iwd (2142 files)
/home/k_deathrun/main/iw_08.iwd (2723 files)
/home/k_deathrun/main/iw_07.iwd (3384 files)
/home/k_deathrun/main/iw_06.iwd (990 files)
/home/k_deathrun/main/iw_05.iwd (928 files)
-
Code:
root@mynl.pl:~# /home/cod4.sh
> [WARNING] Compiled for: COD_VERSION
> [INFO] value of closer=080c206e
CoD4 MP 1.7 build linux-i386 Jun 28 2008
begin $init
----- FS_Startup -----
Current language: english
Current search path:
/home/cod4/server/mods/nl_zom
/home/cod4/server/main/iw_13.iwd (265 files)
/home/cod4/server/main/iw_12.iwd (33 files)
/home/cod4/server/main/iw_11.iwd (448 files)
/home/cod4/server/main/iw_10.iwd (230 files)
/home/cod4/server/main/iw_09.iwd (447 files)
/home/cod4/server/main/iw_08.iwd (66 files)
/home/cod4/server/main/iw_07.iwd (34 files)
/home/cod4/server/main/iw_06.iwd (416 files)
-
console_mp.log
Code:
scriptengine> wrongs args for mysql_real_connect(...);
_config.gsc
PHP Code:
level.mysqlUser = "user";
level.mysqlAdress = "mynl.pl";
level.mysqlPort = "3306";
level.mysqlDb = "cod4_zom";
level.mysqlPass = "pass";
mysql.gsc
PHP Code:
host = level.mysqlAdress;
user = level.mysqlUser;
pass = level.mysqlPass;
db = level.mysqlDb;
port = level.mysqlPort;
mysql = mysql_init();
if ( ! isDefined(mysql))
{
std\io::println("mysql not defined!");
return;
}
std\io::println("mysql=" + ("2"+2) + "\n");
ret = mysql_real_connect(mysql, host, user, pass, db, port);
...
-
port is int (a number), you would be better off just re-using the data/code-separation with cvar's
-
Thanks, for replay. After dealing with a few problems with mysql I get error:
Code:
/home/cod4.sh: line 2: 3922 Naruszenie ochrony pamięci LD_LIBRARY_PATH="/home/cod4/server/libs:/home/cod4/server/libs/mysql" LD_PRELOAD="/home/cod4/server/libs/libcod4_1_7.so" ./cod4_lnxded +set dedicated "2" +set net_port "41" +set fs_basepath "/home/cod4/server" +set fs_homepath "/home/cod4/server" +set fs_game "mods/nl_zom" +exec zom.cfg +map_rotate
English
"Naruszenie ochrony pamięci" = "Segfault" or "Segmentation fault"
After calling to MySQL query:
PHP Code:
theQuery = "SELECT * FROM players";
-
Most likely the result of a null pointer given to mysql_query(). You need to save the return value of mysql_init() in level.mysql e.g. and reuse it for every query.
You can just print the pointer (an int), to see its value: std\io::println("mysql pointer: " + mysql);