Another mysql error -.-
#1

he guys it me again i had an old gang fs but didnt work bec it needed stickenkid's mysql plugin so i forgot about it nw i found a new one that is working great but! the only thing it needed onplayertext so i got it from the old one addedd declerations enums and all that make it work even took some of the old mysql and put them in a_mysql to work nw only left with 1 error yay LD ill show u the lines and errors :
The Lines (220-22

stock GetGangName(GangID)
{
new gName[100], Query[150];
format(Query, sizeof(Query), "SELECT name FROM gangs WHERE id = %d;", GangID);
mysql_query(Query);
mysql_store_result();
mysql_fetch_string(gName);
return gName;
}

The error is : (224) : error 035: argument type mismatch (argument 1)
the line is mysql_query(Query);
if anyone has any idea how to fix please help me xD as im dying for the gang fs in my gm thanks in advance
Reply
#2

Assuming the version of the mysql you're using is from the latest versions, the first argument is the connection handle and the second is the query.

pawn Код:
// global:
static SQL = -1;

// connecting:
SQL = mysql_connect(...);

// use of it:
mysql_query(SQL, Query);
Reply
#3

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
Assuming the version of the mysql you're using is from the latest versions, the first argument is the connection handle and the second is the query.

pawn Код:
// global:
static SQL = -1;

// connecting:
SQL = mysql_connect(...);

// use of it:
mysql_query(SQL, Query);
hmmm where to write that hehe??
Reply
#4

Are you using BlueG's plugin or StrickenKid's ?
Reply
#5

Quote:
Originally Posted by rappy93
Посмотреть сообщение
Are you using BlueG's plugin or StrickenKid's ?
Stickenkid's plugin didnt work neither than bluG's so i took stieknkids and copied it to BlueG's so both of them working good nw except that error
and i think u will say thats wrong becoz nw items r defined 2 times and ill reply no bec when it said already defined i went and deleted all that said that
Reply
#6

Not sure it will work if you combined them but lets try.
Put this at the top of the gamemode and fill in your DB connection info.
pawn Код:
new connectionHandle;
#define SQL_HOST ""
#define SQL_USER ""
#define SQL_PASS ""
#define SQL_DB ""
And under OnGameModeInit add
pawn Код:
connectionHandle = mysql_connect(SQL_HOST, SQL_USER, SQL_DB, SQL_PASS);
Now,a querry should look like this:

pawn Код:
mysql_function_query(connectionHandle, query, "","");
For more information about SYNTAX and stuff go to BlueG's wiki page.
Reply
#7

Quote:
Originally Posted by rappy93
Посмотреть сообщение
Not sure it will work if you combined them but lets try.
Put this at the top of the gamemode and fill in your DB connection info.
pawn Код:
new connectionHandle;
#define SQL_HOST ""
#define SQL_USER ""
#define SQL_PASS ""
#define SQL_DB ""
And under OnGameModeInit add
pawn Код:
connectionHandle = mysql_connect(SQL_HOST, SQL_USER, SQL_DB, SQL_PASS);
Now,a querry should look like this:

pawn Код:
mysql_function_query(connectionHandle, query, "","");
For more information about SYNTAX and stuff go to BlueG's wiki page.
k gonna test
thank you
Reply
#8

no didnt work i managed to fix the error but i got some errors in the server consol can anyone take a look at my server log thanks

[18:15:36] Loading filterscript 'Testing...amx'...
[18:15:36] Error: Function not registered: 'mysql_connect'
[18:15:36] Error: Function not registered: 'mysql_tquery'
[18:15:36] Error: Function not registered: 'cache_get_field_content'
[18:15:36] Error: Function not registered: 'cache_get_field_content_float'
[18:15:36] Error: Function not registered: 'mysql_query'
[18:15:36] Error: Function not registered: 'mysql_store_result'
[18:15:36] Error: Function not registered: 'mysql_fetch_string'
my consol errors
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)