PDA

View Full Version : mysqllibcod



maxdamage99
10th October 2015, 13:29
Hello, give me libcod1.0(last version) with Mysql functions "(znation.nl/cod4script/(MYSQL)"

serthy
10th October 2015, 13:40
Hello, give me libcod1.0(last version) with Mysql functions "(znation.nl/cod4script/(MYSQL)"

940

For the fked up SW:Battlefront hype..

maxdamage99
10th October 2015, 13:50
autistic serthy, thanks for the answer.
If I download a killtube/libcod, or compile it on my VDS, error: Segmentation fault

IzNoGoD
10th October 2015, 16:22
autistic serthy, thanks for the answer.
If I download a killtube/libcod, or compile it on my VDS, error: Segmentation fault

THEN HOW IS IT GONNA HELP IF WE COMPILE IT FOR YOU?

maxdamage99
10th October 2015, 16:47
Compile a normal file .so?
I tried a lot of files libcod2_1_0.so (different versions), sometimes an error Segmentation Fault when you start the server, or server good start, if player connect = server crash and error Segmentation Fault!

IzNoGoD
10th October 2015, 18:29
Are you SURE you're running a 1.0 server?

maxdamage99
10th October 2015, 19:01
This began to happen when I started to use mysql_init(), mysql_query()... etc.
The fact is that before Mysql functions have been now, before doing so "closer(101,102,103);" etc.
When replacing "closer(100);" on "mysq_init()" , this error Segmentation fault. maybe i use "bad" version libcod?!

IzNoGoD
10th October 2015, 19:47
Then you dont have the proper pre-requisites installed. Did you follow the steps in the github page?

maxdamage99
10th October 2015, 19:50
sorry Iznogod, fucking language barrier, I almost did not understand from what you said :(

IzNoGoD
10th October 2015, 20:03
dpkg --add-architecture i386
apt-get update
apt-get install gcc-multilib
apt-get install libmysqlclient-dev:i386
apt-get install g++-multilib

Are you sure you did that AND that it was successful?

I know a debian system on which the libmysqlclient-dev:i386 did NOT want to install

maxdamage99
10th October 2015, 20:07
Ubuntu 14.04.1 LTS (GNU/Linux 2.6.32-042stab108.2 x86_64)
///////////////////////////////////


apt-get install libmysqlclient-dev:i386Reading package lists... Done
Building dependency tree
Reading state information... Done
libmysqlclient-dev:i386 is already the newest version.
The following package was automatically installed and is no longer required:
sqlite3
Use 'apt-get autoremove' to remove it.
0 upgraded, 0 newly installed, 0 to remove and 88 not upgraded.

IzNoGoD
10th October 2015, 22:31
Then the error is most likely in your scripting. Show mysql-related scripts.

maxdamage99
11th October 2015, 07:45
ms_connect:


{
level.mysqlUser = "root2"; ///user have permissions high-hard)) 0755
level.mysqlAdress = "136.137.136.125";
level.mysqlPort = 3306;
level.mysqlDb = "namedatabase";
level.mysqlPass = "password123"; //password user: root2

println("MYSQL>Podklychenie");

mysql = mysql_init();
mysqlresponse = mysql_real_connect(mysql, level.mysqlAdress, level.mysqlUser, level.mysqlPass, level.mysqlDb, level.mysqlPort);
if (!mysqlresponse)
{
println("errno="+mysql_errno(mysql) + " error=''"+mysql_error(mysql) + "''");
mysql_close(mysql);
return;
}
std\io::println("MySQL > Connection created: handle="+mysql+".");
level.data["mysql"]=mysql;
}


mysql_init() =0
///////////////////
error? or good?
///////////////////
if i use instead "mysql_init() etc." use "closer(100); closer(101,arg); etc."
Server say me:


Param 0 needs to be an int, >make function for this<=0 given! NumParams=2
scriptengine> wrongs args for mysql_query(...);
Param 0 needs to be an int, >make function for this<=0 given! NumParams=1
scriptengine> wrongs args for mysql_errno(mysql);
Param 0 needs to be an int, >make function for this<=0 given! NumParams=1
scriptengine> wrongs args for mysql_error(mysql);
Param 0 needs to be an int, >make function for this<=0 given! NumParams=2
scriptengine> wrongs args for mysql_query(...);
Param 0 needs to be an int, >make function for this<=0 given! NumParams=1
scriptengine> wrongs args for mysql_errno(mysql);
Param 0 needs to be an int, >make function for this<=0 given! NumParams=1
scriptengine> wrongs args for mysql_error(mysql);

maxdamage99
11th October 2015, 12:45
I have an empty database, and cod2 swears on


response = mysql_store_result(level.base["mysql"]);
if(mysql_num_rows(response) != 1) //error, Segmentation Fault
{
//////
}

p.s: I figured with the launch of the server)

IzNoGoD
11th October 2015, 14:08
did you check if response was defined...

also did you run this in develope rmode?

maxdamage99
11th October 2015, 14:37
response=0

IzNoGoD
11th October 2015, 14:53
Then you're trying to access some result stored in memory address 0, or you have the NULLPOINTEREXCEPTION which is EXACTLY whats crashing your cod.

Fix your script/mysql database

maxdamage99
12th October 2015, 14:14
Ty iznogod, I solved the problem, indeed a script error)