PDA

View Full Version : Question about this cmd.


pln102
11/05/2013, 03:14 AM
Is there something wrong this cmd??? i can't figure it out
C:\Users\ben\Desktop\WL-RP Fixed\WLRP.pwn(51029) : warning 217: loose indentation
C:\Users\ben\Desktop\WL-RP Fixed\WLRP.pwn(51030) : error 029: invalid expression, assumed zero
C:\Users\ben\Desktop\WL-RP Fixed\WLRP.pwn(51030) : warning 215: expression has no effect
C:\Users\ben\Desktop\WL-RP Fixed\WLRP.pwn(51030) : error 001: expected token: ";", but found "]"
C:\Users\ben\Desktop\WL-RP Fixed\WLRP.pwn(51030) : error 029: invalid expression, assumed zero
C:\Users\ben\Desktop\WL-RP Fixed\WLRP.pwn(51030) : fatal error 107: too many error messages on one line
CMD:helpers(playerid)
{
new string[128];
SendClientMessage(playerid, COLOR_YELLOW, "*** Helpers Online: ***");
foreach(Player, i) {
format(string, sizeof(string), "%s %s", [pNewbRank]), PlayerName(i));
SendClientMessage(playerid, COLOR_YELLOW, string);
}
}
} else {

}
return 1;
}
Red line is the error when i complie

[CG]Milito
11/05/2013, 03:20 AM
CMD:helpers(playerid)
{
new string[128];
SendClientMessage(playerid, COLOR_YELLOW, "*** Helpers Online: ***");
foreach(Player, i)
{
format(string, sizeof(string), "%s %s", [pNewbRank], PlayerName(i));
SendClientMessage(playerid, COLOR_YELLOW, string);
}
}
} else {

}
return 1;
}

Oo'
You have 3 { and 5 }

pln102
11/05/2013, 03:53 AM
I did replaced the code but still getting errors
C:\Users\ben\Desktop\WL-RP Fixed\WLRP.pwn(51029) : warning 217: loose indentation
C:\Users\ben\Desktop\WL-RP Fixed\WLRP.pwn(51031) : error 029: invalid expression, assumed zero
C:\Users\ben\Desktop\WL-RP Fixed\WLRP.pwn(51031) : warning 215: expression has no effect
C:\Users\ben\Desktop\WL-RP Fixed\WLRP.pwn(51031) : error 001: expected token: ";", but found "]"
C:\Users\ben\Desktop\WL-RP Fixed\WLRP.pwn(51031) : error 029: invalid expression, assumed zero
C:\Users\ben\Desktop\WL-RP Fixed\WLRP.pwn51031) : fatal error 107: too many error messages on one line

VishvaJeet
11/05/2013, 04:26 AM
CMD:helpers(playerid,params[])
{
new string[128];
SendClientMessage(playerid, COLOR_YELLOW, "*** Helpers Online: ***");
foreach(Player, i)
{
format(string, sizeof(string), "%s %s", [pNewbRank], PlayerName(i));
SendClientMessage(playerid, COLOR_YELLOW, string);
}
}
}
else SendClientMessage(playerid,COLOR_YELLOW,"lol");

}
return 1;
}