23.05.2010, 12:31
Tou a fazer um speedomer, na de mais, peguei num e editei:
mas dб-me estes erros
pawn Код:
public speedometer()
{
new Float:Speed;
new vehicleid;
new playerid;
new string[20];
for(playerid = 0; playerid < MAX_PLAYERS; playerid++)
{
if(SpeedProgress[playerid] != INVALID_BAR_ID)
{
vehicleid = GetPlayerVehicleID(playerid);
GetVehicleSpeed(vehicleid, Speed);
format(string, sizeof(string), "Velocidade: %i km/h", floatround(Speed));
SetProgressBarValue(SpeedProgress[playerid], Speed);
TextDrawSetString(SpeedProgressMsg[playerid], string);
TextDrawShowForPlayer(playerid, SpeedProgressMsg[playerid]);
UpdateProgressBar(SpeedProgress[playerid], playerid);
}
}
return 1;
}
Код:
C:\Program Files\Rockstar Games\GTA San Andreas\server\BC_RP.pwn(14128) : error 017: undefined symbol "SpeedProgress" C:\Program Files\Rockstar Games\GTA San Andreas\server\BC_RP.pwn(14128) : warning 215: expression has no effect C:\Program Files\Rockstar Games\GTA San Andreas\server\BC_RP.pwn(14128) : error 001: expected token: ";", but found "]" C:\Program Files\Rockstar Games\GTA San Andreas\server\BC_RP.pwn(14128) : error 029: invalid expression, assumed zero C:\Program Files\Rockstar Games\GTA San Andreas\server\BC_RP.pwn(14128) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors.