WTF IS THIS F**KIN MYSQL INI :@:@:@:@ AGIAN - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: WTF IS THIS F**KIN MYSQL INI :@:@:@:@ AGIAN (
/showthread.php?tid=363812)
WTF IS THIS F**KIN MYSQL INI :@:@:@:@ AGIAN -
TheDeath - 28.07.2012
code
Код:
new Query[256],pName[MAX_PLAYER_NAME],Admin[1],Lang[1],VIP[1];
GetPlayerIp(playerid,IP[playerid],16);
GetPlayerName(playerid,pName,24);
format(Query,sizeof(Query),"SELECT * FROM `users_drift` WHERE username = '%s' LIMIT 1",PlayerName(playerid));
mysql_query(Query);
mysql_store_result();
mysql_retrieve_row();
mysql_get_field("Admin",Admin);
mysql_get_field("Lang",Lang);
mysql_get_field("VIP",VIP);
printf("Admin:%d",strval(Admin));
printf("Lang:%d",strval(Lang));
printf("VIP:%d",strval(VIP));
PRINTS
ADMIN:0
LANG:0
VIP:1
ACTUALLY THEY ARE ALL 1
DEBUG:
Код:
[21:24:43] >> mysql_query( Connection handle: 1 )
[21:24:43] CMySQLHandler::Query(SELECT * FROM `users_drift` WHERE username = '[DDT]Andrey' LIMIT 1) - Successfully executed.
[21:24:43] >> mysql_store_result( Connection handle: 1 )
[21:24:43] CMySQLHandler::StoreResult() - Result was stored.
[21:24:43] >> mysql_retrieve_row( Connection handle: 1 )
[21:24:43] >> mysql_fetch_field_row( Connection handle: 1 )
[21:24:43] CMySQLHandler::FetchField("Admin") - 1
[21:24:43] >> mysql_fetch_field_row( Connection handle: 1 )
[21:24:43] CMySQLHandler::FetchField("Lang") - 1
[21:24:43] >> mysql_fetch_field_row( Connection handle: 1 )
[21:24:43] CMySQLHandler::FetchField("VIP") - 1
[21:24:43] >> mysql_query( Connection handle: 1 )
[21:24:43] CMySQLHandler::Query(SELECT * FROM `users_drift` WHERE username = '[DDT]Andrey' LIMIT 1) - Successfully executed.
[21:24:43] >> mysql_store_result( Connection handle: 1 )
[21:24:43] CMySQLHandler::StoreResult() - Result was stored.
[21:24:43] >> mysql_num_rows( Connection handle: 1 )
[21:24:43] CMySQLHandler::NumRows() - Returned 1 row(s)
[21:24:43] >> mysql_free_result( Connection handle: 1 )
[21:24:43] CMySQLHandler::FreeResult() - Result was successfully free'd.
[21:24:46] >> mysql_query( Connection handle: 1 )
[21:24:46] CMySQLHandler::Query(SELECT * FROM `users_drift` WHERE username = '[DDT]Andrey' LIMIT 1) - Successfully executed.
[21:24:46] >> mysql_store_result( Connection handle: 1 )
[21:24:46] CMySQLHandler::StoreResult() - Result was stored.
[21:24:46] >> mysql_retrieve_row( Connection handle: 1 )
[21:24:46] >> mysql_fetch_field_row( Connection handle: 1 )
[21:24:46] CMySQLHandler::FetchField("IP") - 192.168.1.2
[21:24:46] >> mysql_num_rows( Connection handle: 1 )
[21:24:46] CMySQLHandler::NumRows() - Returned 1 row(s)
[21:24:46] >> mysql_free_result( Connection handle: 1 )
[21:24:46] CMySQLHandler::FreeResult() - Result was successfully free'd.
Re: WTF IS THIS F**KIN MYSQL INI :@:@:@:@ AGIAN -
TheDeath - 28.07.2012
Yeah no one can anwser me , because this mysql ini is the stiupitest thing ever made.No one can anwser me why this is happening
Re: WTF IS THIS F**KIN MYSQL INI :@:@:@:@ AGIAN -
Vince - 28.07.2012
- You are stupid for not knowing the Pawn language.
- It's called MySQL. Solely. INI is a file format. Nothing to do with it.
- Strings need a null terminator, so the cell size needs to be at least 2 (recommended 12 to cover any possible number).
Re: WTF IS THIS F**KIN MYSQL INI :@:@:@:@ AGIAN -
TheDeath - 28.07.2012
Sorry i wans very angry because i cant fix this error for 6 hours and i must tell you that this ini is really very shitty because when the ini cant make difference between integer and string then i must call strval everytime