error 028: invalid subscript (not an array or too many subscripts) NEED QUICK HELP! - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: error 028: invalid subscript (not an array or too many subscripts) NEED QUICK HELP! (
/showthread.php?tid=409511)
error 028: invalid subscript (not an array or too many subscripts) NEED QUICK HELP! -
LuckyPlaya` - 21.01.2013
Need some help here..
Errors:
Код:
D:\Users\ROBERT\Desktop\- Exclusive Gaming RolePlay - 0.3e\gamemodes\egrp.pwn(954) : error 028: invalid subscript (not an array or too many subscripts): "VehicleStatistics"
D:\Users\ROBERT\Desktop\- Exclusive Gaming RolePlay - 0.3e\gamemodes\egrp.pwn(954) : warning 215: expression has no effect
D:\Users\ROBERT\Desktop\- Exclusive Gaming RolePlay - 0.3e\gamemodes\egrp.pwn(954) : error 001: expected token: ";", but found "]"
D:\Users\ROBERT\Desktop\- Exclusive Gaming RolePlay - 0.3e\gamemodes\egrp.pwn(954) : error 029: invalid expression, assumed zero
D:\Users\ROBERT\Desktop\- Exclusive Gaming RolePlay - 0.3e\gamemodes\egrp.pwn(954) : fatal error 107: too many error messages on one line
Rows
error only comes on first row)
Код:
VehicleStatistics[i][vehicle_dealership] = INI_ReadInt("vehicle_dealership");
VehicleStatistics[i][vehicle_model] = INI_ReadInt("vehicle_model");
VehicleStatistics[i][vehicle_price] = INI_ReadInt("vehicle_price");
VehicleStatistics[i][vehicle_position][1] = INI_ReadFloat("vehicle_x");
VehicleStatistics[i][vehicle_position][2] = INI_ReadFloat("vehicle_y");
VehicleStatistics[i][vehicle_position][3] = INI_ReadFloat("vehicle_z");
VehicleStatistics[i][vehicle_position][4] = INI_ReadFloat("vehicle_angle");
VehicleStatistics[i][vehicle_onsale] = INI_ReadInt("vehicle_onsale");
vehicle = CreateVehicle(VehicleStatistics[i][vehicle_model], VehicleStatistics[i][vehicle_position][1], VehicleStatistics[i][vehicle_position][2], VehicleStatistics[i][vehicle_position][3], VehicleStatistics[i][vehicle_position][4], 0, 0, -1);
format(string, sizeof(string), "{00C3FF}%s On Sale - Price: $%d{00C3FF}", GetVehicleName(vehicle), VehicleStatistics[i][vehicle_price]);
VehicleStatistics[i][vehicle_label] = Create3DTextLabel(string, color_orange, VehicleStatistics[i][vehicle_position][1], VehicleStatistics[i][vehicle_position][2], VehicleStatistics[i][vehicle_position][3], 10.0, 0);
INI_Close();
}
}
return 1;
}
Re: error 028: invalid subscript (not an array or too many subscripts) NEED QUICK HELP! -
arakuta - 21.01.2013
This "i" is about vehicles?
pawn Код:
new VehicleStatistics[MAX_VEHICLES][I Guess a enum here]