Getting 1 Errore Whent compiling pawno -
donhu789 - 19.10.2013
PHP код:
C:\Documents and Settings\Scample\Desktop\New Folder (8)\gamemodes\Private.pwn(22962) : error 001: expected token: ";", but found "for"
the Pawn Code
pawn Код:
CMD:tplist(playerid, params[])
{
#pragma unused params
new
count = 0,
h,
m,
tmp[128],
string[800];
new player1 = strval(tmp)
for(new i = 0; i < MAX_PLAYERS; i++)
{
if (IsPlayerConnected(i))
{
if( PlayerInfo[playerid][Trusted]>= 1)
{
format(string, 500, "%s[ID:%i]| Score: %d | Hours: %d |Mins: %d", PlayerName2(i),i,GetPlayerScore(player1),h,m);
//We are appending the string, so put %s before any new data is added,
//and that parameter actually refers to the string itself.
count++;
}
}
}
if (count == 0) ShowPlayerDialog(playerid, 806, DIALOG_STYLE_MSGBOX, "{FF0000}=™Online Trusted Player™=", "No Trusted player Currently Online", "Ok", "");
else ShowPlayerDialog(playerid, 806, DIALOG_STYLE_MSGBOX, "{FF0000}=™Online Trusted Player™=", string, "Ok", "");
return 1;
}
Can anyone help i try alot of thing
Re: Getting 1 Errore Whent compiling pawno -
iZN - 19.10.2013
On which line?
Re: Getting 1 Errore Whent compiling pawno -
donhu789 - 19.10.2013
for(new i = 0; i < MAX_PLAYERS; i++)
Re: Getting 1 Errore Whent compiling pawno -
donhu789 - 19.10.2013
If You cant can you do a command just same same mine
Re: Getting 1 Errore Whent compiling pawno -
iZN - 19.10.2013
pawn Код:
new player1 = strval(tmp);
You forget ;
Re: Getting 1 Errore Whent compiling pawno -
newbie scripter - 19.10.2013
try this
Код:
for(new i = 0, i < MAX_PLAYERS; i++)
u typed ';' instead of ','
Re: Getting 1 Errore Whent compiling pawno -
iZN - 19.10.2013
Quote:
Originally Posted by newbie scripter
try this
Код:
for(new i = 0, i < MAX_PLAYERS; i++)
u typed ';' instead of ','
|
No he looped it correct. You're doing that wrong. You are telling the compiler that there are more variables after i = 0. Using a colon is used for variable initialization.
Re: Getting 1 Errore Whent compiling pawno -
donhu789 - 19.10.2013
IZN can you fix my command for my ?
Re: Getting 1 Errore Whent compiling pawno -
iZN - 19.10.2013
Quote:
Originally Posted by donhu789
IZN can you fix my command for my ?
|
Did you read my above reply?
Re: Getting 1 Errore Whent compiling pawno -
.::: Ecko :::. - 19.10.2013
Код:
for(new i = 0; i < MAX_PLAYERS; i++)
That should work