14.11.2014, 17:04
-nvm-
new CrewList[MAX_PLAYERS][MAX_GANGS];
CMD:crews(playerid, params[])
{
new query[300], userstring[300], n;
new crewname[300], crewbalance[300];
format(query, sizeof(query), "SELECT * FROM crews ORDER BY name ASC");
mysql_query(query);
mysql_store_result();
while(mysql_fetch_row(query))
{
mysql_fetch_string("name", crewname);
mysql_fetch_string("balance", crewbalance);
format(userstring, sizeof(userstring), "%s%s ($%s) \n",userstring,crewname,crewbalance);
CrewList[playerid][n] = id; // get the id from the database
n++;
}
mysql_free_result();
ShowPlayerDialog(playerid,crews,DIALOG_STYLE_LIST,"Crews",userstring,"Continue","Close");
return 1;
}
OnDialogResponse:
new id = CrewList[playerid][listitem];
..pwn(2956) : error 035: argument type mismatch (argument 2) Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error.
CMD:crews(playerid, params[])
{
new query[300], userstring[300], n;
new crewname[300], crewbalance[300];
new crewid;
format(query, sizeof(query), "SELECT * FROM crews ORDER BY name ASC");
mysql_query(query);
mysql_store_result();
while(mysql_fetch_row(query))
{
mysql_fetch_string("name", crewname);
mysql_fetch_string("balance", crewbalance);
mysql_fetch_string("id", crewid);
format(userstring, sizeof(userstring), "%s%s ($%s) \n",userstring,crewname,crewbalance);
CrewList[playerid][n] = crewid; // get the id from the database
n++;
}
mysql_free_result();
ShowPlayerDialog(playerid,crews,DIALOG_STYLE_LIST,"Crews",userstring,"Continue","Close");
return 1;
}