23.09.2012, 09:39
That's not what I mean, in Pawn, everytime you call a function, it has to be followed by a semicolon.
It's
not
and you don't need "new ID" because ID is defined at the top as a global variable.
Also, enable debugging with mysql_debug(1); in OnGameModeInit, start your script and afterwards, look in mysql_log.txt in your server directory, and see what it says. You might not even be connected to the database.
One more thing in the MYSQLUpdate function, you're using mysql_function_query wrong.
It's supposed to be
It's
pawn Код:
cache_get_field_content(i, "id", GName);
pawn Код:
cache_get_field_content(i, "id", GName),
Also, enable debugging with mysql_debug(1); in OnGameModeInit, start your script and afterwards, look in mysql_log.txt in your server directory, and see what it says. You might not even be connected to the database.
One more thing in the MYSQLUpdate function, you're using mysql_function_query wrong.
It's supposed to be
pawn Код:
public MYSQLUpdate()
{
mysql_function_query(DBHandle, "SELECT * FROM `testtable` ORDER BY `id` ", true, "onMYSQLUpdate", "");
return 1;
}