Здравствуйте, появились ошибки в моде когда вставил спидометр, помогите пожалуйста исправить вот сами ошибки:
Код:
C:\Users\Игорь\Desktop\Сервер\gamemodes\cream1.2.pwn(21229) : error 017: undefined symbol "COLOR_BOX"
C:\Users\Игорь\Desktop\Сервер\gamemodes\cream1.2.pwn(62163) : warning 219: local variable "ST" shadows a variable at a preceding level
C:\Users\Игорь\Desktop\Сервер\gamemodes\cream1.2.pwn(62175) : error 017: undefined symbol "IsLocked"
C:\Users\Игорь\Desktop\Сервер\gamemodes\cream1.2.pwn(62175) : error 001: expected token: ";", but found "]"
C:\Users\Игорь\Desktop\Сервер\gamemodes\cream1.2.pwn(62175) : error 029: invalid expression, assumed zero
C:\Users\Игорь\Desktop\Сервер\gamemodes\cream1.2.pwn(62175) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
5 Errors.
Код:
Box = TextDrawCreate(395.0, 354.0, "_");
LBorder = TextDrawCreate(286.0,354.0,"_");
RBorder = TextDrawCreate(504.0,354.0,"_");
BBorder = TextDrawCreate(395.0,416.0,"_");
TBorder = TextDrawCreate(395.0,354.0,"_");
Speed = TextDrawCreate(377.000000,370.000000,"SPEED:");
Health = TextDrawCreate(295.000000,370.000000,"HEAL:");
Fuelll = TextDrawCreate(295.000000,391.000000,"FUEL:");
TextDrawLetterSize(Speed,0.259999,1.110000);
TextDrawLetterSize(Health,0.245999,1.110000);
TextDrawLetterSize(Fuelll,0.259999,1.010000);
TextDrawFont(Fuelll,2);
TextDrawFont(Speed,2);
TextDrawFont(Health,2);
TextDrawBackgroundColor(Fuelll,COLOR_BLACK);
TextDrawBackgroundColor(Speed,COLOR_BLACK);
TextDrawBackgroundColor(Health,COLOR_BLACK);
TextDrawColor(Fuelll,COLOR_BLUE);
TextDrawColor(Speed,COLOR_BLUE);
TextDrawColor(Health,COLOR_BLUE);
TextDrawSetOutline(Fuelll,1);
TextDrawSetOutline(Speed,1);
TextDrawSetOutline(Health,1);
TextDrawSetProportional(Fuelll,1);
TextDrawSetProportional(Speed,1);
TextDrawSetProportional(Health,1);
TextDrawSetShadow(Fuelll,1);
TextDrawSetShadow(Speed,1);
TextDrawSetShadow(Health,1);
TextDrawUseBox(Box, 1);
TextDrawBoxColor(Box, COLOR_BOX);
TextDrawTextSize(Box, 0.0, 215.0);
TextDrawLetterSize(Box, 0.0, 6.7);
TextDrawAlignment(Box, 2);
TextDrawUseBox(LBorder, 1);
TextDrawBoxColor(LBorder,COLOR_BORDER);
TextDrawTextSize(LBorder, 0.0, -2.0);
TextDrawLetterSize(LBorder, 0.0, 6.7);
TextDrawAlignment(LBorder, 2);
TextDrawUseBox(RBorder, 1);
TextDrawBoxColor(RBorder,COLOR_BORDER);
TextDrawTextSize(RBorder, 0.0, -2.0);
TextDrawLetterSize(RBorder, 0.0, 6.7);
TextDrawAlignment(RBorder, 2);
TextDrawUseBox(BBorder, 1);
TextDrawBoxColor(BBorder, COLOR_BORDER);
TextDrawTextSize(BBorder, 0.0, 215.0);
TextDrawLetterSize(BBorder, 0.0, -0.2);
TextDrawAlignment(BBorder, 2);
TextDrawUseBox(TBorder, 1);
TextDrawBoxColor(TBorder, COLOR_BORDER);
TextDrawTextSize(TBorder, 0.0, 215.0);
TextDrawLetterSize(TBorder, 0.0, -0.2);
TextDrawAlignment(TBorder, 2);
Код:
stock SpeedVehicle(playerid)
{
new Float:ST[4];
if(IsPlayerInAnyVehicle(playerid)) GetVehicleVelocity(GetPlayerVehicleID(playerid),ST[0],ST[1],ST[2]);
else GetPlayerVelocity(playerid,ST[0],ST[1],ST[2]);
ST[3] = floatsqroot(floatpower(floatabs(ST[0]), 2.0) + floatpower(floatabs(ST[1]), 2.0) + floatpower(floatabs(ST[2]), 2.0)) * 213.3;
return floatround(ST[3]);
}
Код:
public UpdateSpeedometr(playerid)
{
if(GetPlayerState(playerid) == 2)
{
new locked[32],str[64],str2[64],str3[64],str4[64]
, str5[64], str6[64], Float:vehhel, vehh[20], vehs[20], vehe[20], veher[20];
if(IsLocked[GetPlayerVehicleID(playerid)] == true) locked = "~r~LOCK";
else locked = "~g~UNLOCK";
GetVehicleHealth(GetPlayerVehicleID(playerid), vehhel);
if(vehhel <= 500) vehh = "~r~";
else vehh = "";
if(Fuell[GetPlayerVehicleID(playerid)] <= 30) vehs = "~r~";
else vehs = "";
if(zavodis[playerid] == true) vehe = "~g~ON";
else vehe = "~r~OFF";
format(str, sizeof(str),"%d KM/H",SpeedVehicle(playerid) / 2);
if(vehhel <= 300) format(str3, sizeof(str3),"%s30%",vehh); else format(str3, sizeof(str3),"%s%.0f%",vehh,vehhel / 10);
format(str2, sizeof(str2), "%s", locked);
format(str4, sizeof(str4), "%s%.0f", vehs,Fuell[GetPlayerVehicleID(playerid)]);
format(str5, sizeof(str5), "%s", vehe);
format(str6, sizeof(str6), "%s", veher);
TextDrawSetString(FuelShow[playerid],str4);
TextDrawSetString(HealthShow[playerid],str3);
TextDrawSetString(SpeedShow[playerid],str);
TextDrawSetString(StatusShow[playerid],str2);
TextDrawSetString(Speed2Show[playerid],str6);
TextDrawSetString(EngineShow[playerid],str5);
UnSurfCar(GetPlayerVehicleID(playerid));
}
return 0;
}