29.08.2014, 19:56
Hey guys, i hace a problem with the /members command i get some errors in console but the command is working fine.
The command is:
And i get the following error in console:
HOW CAN I FIX THIS?
THANKS.
The command is:
Код HTML:
PAWN Code :*[Select] CMD:members(playerid, params[]) { if(playerVariables[playerid][pGroup] >= 1 && playerVariables[playerid][pGroupRank] >= 6) { new aim[256]; format(aim, 256,"{FFB300}%s members ({00B3FF}%d{FFFFFF}/{00B3FF}10{FFB300}):{FFFFFF} \n",groupVariables[playerVariables[playerid][pGroup]][gGroupName],groupVariables[playerVariables[playerid][pGroup]][gMembers]); new query[300],test[300],test2[256]; format(query, sizeof(query), "SELECT playerName, playerGroupRank, playerCarWeapon3 FROM playeraccounts WHERE playerGroup = %d ORDER BY playerGroupRank DESC LIMIT 10",playerVariables[playerid][pGroup]); mysql_query(query); format(test, sizeof(test), "SELECT playerGroupRank FROM playeraccounts WHERE playerGroup = %d",playerVariables[playerid][pGroup]); mysql_query(test); format(test2, sizeof(test2), "SELECT playerCarWeapon3 FROM playeraccounts WHERE playerGroup = %d",playerVariables[playerid][pGroup]); mysql_query(test2); mysql_store_result(); new memid; while(mysql_retrieve_row()) { mysql_fetch_field_row(query, "playerName"); format(Selected[memid][snume],24,"%s",query); mysql_fetch_field_row(test, "playerGroupRank"); Selected[memid][srank] = strval(test); mysql_fetch_field_row(test2, "playerCarWeapon3"); Selected[memid][swarn] = strval(test2); format(aim, sizeof(aim), "%s %s - Rank: %s - Warns: %s/3 \n",aim,query, test,test2); memid ++; } mysql_free_result(); ShowPlayerDialog(playerid,DIALOG_MEMBERS,DIALOG_STYLE_LIST,"Members:",aim,"Sellect","Cancel"); } }
Код HTML:
[20:09:14] errorid: 2014 | error: Commands out of sync; you can't run this command now | resultid: -1 | extraid: -1 | callback: NULL | query: SELECT playerGroupRank FROM playeraccounts WHERE playerGroup = 11 [20:09:14] errorid: 2014 | error: Commands out of sync; you can't run this command now | resultid: -1 | extraid: -1 | callback: NULL | query: SELECT playerCarWeapon3 FROM playeraccounts WHERE playerGroup = 11
THANKS.