15.08.2018, 14:29
Im having some problems with this stock:
Basically, im creating "info - temp" to handle all job stats, instead of creating two different info/temp for each job. What's wrong?
pawn Code:
stock ShowJobStats(playerid)
{
new temp[600];
new info[600];
switch (Player[playerid][Job])
{
case 0;
{
SendClientMessage(playerid,COLOR_RED,"* You don't have a job. Get one from City Hall.");
}
case 1;
{
format(temp, sizeof(temp), ""SAMP_BLUE"Drug Dealer Job Stats\n");
strcat(info, temp);
format(temp, sizeof(temp), "Marijuana Seeds: "ORANGE_RED"%d\n\n",Player[playerid][MarijuanaSeeds]);
strcat(info, temp);
format(temp, sizeof(temp), ""WHITE"Cocaine Seeds: "ORANGE_RED"%d\n\n",Player[playerid][CocaineSeeds]);
strcat(info, temp);
format(temp, sizeof(temp), ""WHITE"Heroin Seeds: "ORANGE_RED"%d\n\n",Player[playerid][HeroinSeeds]);
strcat(info, temp);
format(temp, sizeof(temp), ""WHITE"Drugs: "ORANGE_RED"%d "WHITE"grams\n\n",Player[playerid][Drugs]);
strcat(info, temp);
format(temp, sizeof(temp), ""WHITE"Money Earned From Selling Drugs: "ORANGE_RED"%s\n\n",formatInt(Player[playerid][DrugEarnings]));
strcat(info, temp);
}
case 2;
{
format(temp, sizeof(temp), ""SAMP_BLUE"Weapons Dealer Job Stats\n");
strcat(info, temp);
}
case 3;
{
format(temp, sizeof(temp), ""SAMP_BLUE"Trucker Job Stats\n");
strcat(info, temp);
}
case 4;
{
format(temp, sizeof(temp), ""SAMP_BLUE"Taxi Driver Job Stats\n");
strcat(info, temp);
}
case 5;
{
format(temp, sizeof(temp), ""SAMP_BLUE"Bus Driver Job Stats\n");
strcat(info, temp);
}
case 6;
{
format(temp, sizeof(temp), ""SAMP_BLUE"Mechanic Job Stats\n");
strcat(info, temp);
}
case 7;
{
format(temp, sizeof(temp), ""SAMP_BLUE"Pizza Boy Job Stats\n");
strcat(info, temp);
}
}
ShowPlayerDialog(playerid, DIALOG_JOB_STATS, DIALOG_STYLE_MSGBOX,""ORANGE_RED"Job Stats",info,"Close","");
return 1;
}
Quote:
(2695) : error 001: expected token: ":", but found ";" (2695) : error 036: empty statement (2692) : warning 204: symbol is assigned a value that is never used: "info" (2691) : warning 204: symbol is assigned a value that is never used: "temp" (2691 -- 2699) : error 010: invalid function or declaration (2691 -- 2699) : fatal error 107: too many error messages on one line |