sscanf problem
#1

Hi, i have a problem. My code is stopping at :
Код:
sscanf(data, "p<|>fiiiifffs[24]", pInfo[playerid][hp], pInfo[playerid][years],pInfo[playerid][rasa], pInfo[playerid][sex], pInfo[playerid][skin], pInfo[playerid][x], pInfo[playerid][y], pInfo[playerid][z], pInfo[playerid][Nick]);
all its
Код:
format(query, 500, "SELECT HP, years, rasa, sex, skin, X, Y, Z, Nick FROM postacie WHERE Global = '%s'", NazwaGracza(playerid));
						mysql_query(query); 
						mysql_store_result(); 
						while(mysql_fetch_row(data, "|")) { 
							sscanf(data, "p<|>fiiiifffs[24]", pInfo[playerid][hp], pInfo[playerid][years],pInfo[playerid][rasa], pInfo[playerid][sex], pInfo[playerid][skin], pInfo[playerid][x], pInfo[playerid][y], pInfo[playerid][z], pInfo[playerid][Nick]); 
							TogglePlayerSpectating(playerid, 0);
							SetPlayerName(playerid, pInfo[playerid][Nick]);
							SetPlayerPos(playerid, pInfo[playerid][x], pInfo[playerid][y], pInfo[playerid][z]);
							SetPlayerSkin(playerid, pInfo[playerid][skin]);
							pInfo[playerid][zalogowany] = true;
							format(string, 128, "{FF0000}>> {00FFFF}Witaj na serwerze {33cc33}%s(GLOBAL:%s, ID:%i, UID:%i)!", pInfo[playerid][Nick], uInfo[playerid][Nick], playerid, pInfo[playerid][ID]);
							SCM(playerid, -1, string);
						} 
						mysql_free_result();
I'm using strickenkidds mysql.
Reply
#2

Why are you using a plugin that hasn't been updated in 7 years? (fun fact, exactly 7 years 1/25/2011 - v2.1.1)
Reply
#3

i just like it
Reply
#4

Personally, i feel you'd be better off switching to BlueG/Maddinators plugin.

Does it even have threaded queries? IE: The server can't sync other players, or process anything since you're using an outdated plugin, and haven't threaded them.

Vince explains it better:

Quote:
Originally Posted by Vince
Посмотреть сообщение
The idea with a threaded query is that while the query is busy the sa-mp server can continue on and execute other things (sync!). When the query is done, the MySQL servers calls the function you specify and you can go on loading your data.

With an unthreaded query, the sa-mp server has to wait for the response from the MySQL server before it can continue. This is especially troublesome if the query takes more than a few milliseconds to execute. During this "timeout" nothing happens. No syncing, nothing.
Reply
#5

yes, but query is okay. The code is stuck when sscanf
Reply
#6

Solved, just updated sscanf to sscanf2
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)