I'm getting 4 errors on a single line .[Help would be appriciated]
#1

Hello I'm getting a unknown error for this line , Can anyone explain this to me?

Код:
CMD:vstorage(playerid, params[])
{
	new vstring[1024];
	for(new i, iModelID; i <new MAX_PLAYERVEHICLES; i++) {
		if((iModelID = PlayerVehicleInfo[playerid][i][pvModelId] - 400) >= 0) {
			if(PlayerVehicleInfo[playerid][i][pvImpounded]) {
				format(vstring, sizeof(vstring), "%s\n%s (impounded)", vstring, VehicleName[iModelID]);
			}
			else if(PlayerVehicleInfo[playerid][i][pvDisabled]) {
				format(vstring, sizeof(vstring), "%s\n%s (disabled)", vstring, VehicleName[iModelID]);
			}
			else if(!PlayerVehicleInfo[playerid][i][pvSpawned]) {
				format(vstring, sizeof(vstring), "%s\n%s (stored)", vstring, VehicleName[iModelID]);
			}
			else format(vstring, sizeof(vstring), "%s\n%s (spawned)", vstring, VehicleName[iModelID]);
		}
		else strcat(vstring, "\nEmpty");
	}
	ShowPlayerDialog(playerid, VSTORAGE, DIALOG_STYLE_LIST, "Vehicle Storage", vstring, "(De)spawn", "Cancel");
	return 1;
}
Errors:
Код:
 error 029: invalid expression, assumed zero
 warning 215: expression has no effect
 error 001: expected token: ")", but found ";"
 error 036: empty statement
 fatal error 107: too many error messages on one line
The line with the error is:
Код:
for(new i, iModelID; i <new MAX_PLAYERVEHICLES; i++) {
Please help me out to solve this problem.
Reply
#2

Код:
for(new i, iModelID; i <new MAX_PLAYERVEHICLES; i++) {
??

pawn Код:
for(new i; i < MAX_PLAYERVEHICLES; i++) {
I assume you have defined MAX_PLAYERVEHICLES somewhere else in your script.
Reply
#3

Quote:
Originally Posted by spedico
Посмотреть сообщение
Код:
for(new i, iModelID; i <new MAX_PLAYERVEHICLES; i++) {
??

pawn Код:
for(new i; i < MAX_PLAYERVEHICLES; i++) {
I assume you have defined MAX_PLAYERVEHICLES somewhere else in your script.
Oh right , Thanks " defined MAX_PLAYERVEHICLES " was disabled , I got that solved , Thanks for your help mate ,+repped.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)