27.06.2014, 15:16
Hey guys,
I am trying to compile WCRP.pwn, but I get these 9 errors which I am unsure of how to solve them:
Does anyone know how I could fix these problems? I had a look at the code, but could not see the problem.
Here's the code from vehicles.pwn
If anyone could help me with these, it would be greatly appreciated
Thank you!!
I am trying to compile WCRP.pwn, but I get these 9 errors which I am unsure of how to solve them:
Код:
wcrp\vehicles.pwn(1112) : error 017: undefined symbol "CreateProgressBar" wcrp\vehicles.pwn(1684) : error 017: undefined symbol "DestroyProgressBar" wcrp\vehicles.pwn(1742) : error 017: undefined symbol "INVALID_BAR_ID" wcrp\vehicles.pwn(1743) : error 017: undefined symbol "HideProgressBarForPlayer" wcrp\vehicles.pwn(1845) : error 017: undefined symbol "INVALID_BAR_ID" wcrp\vehicles.pwn(1846) : error 017: undefined symbol "SetProgressBarValue" wcrp\vehicles.pwn(1848) : error 017: undefined symbol "ShowProgressBarForPlayer" wcrp\vehicles.pwn(2618) : error 017: undefined symbol "SetProgressBarValue" wcrp\vehicles.pwn(2619) : error 017: undefined symbol "UpdateProgressBar"
Here's the code from vehicles.pwn
Код:
//CODE1
LoadPlayerVehicles(playerid) {
new Bar:bar = CreateProgressBar(508.00, 388.00, 55.50, 3.20, -16776961, 100.0);
SetPVarInt(playerid, "FuelBar", _:bar);
new Text:speedtext = TextDrawCreate(504.000000, 354.000000, "~p~255 ~w~km/h");
TextDrawBackgroundColor(speedtext, 0x000000FF);
TextDrawFont(speedtext, 1);
TextDrawLetterSize(speedtext, 0.400000, 1.000000);
TextDrawColor(speedtext, 0xA803D0FF);
TextDrawSetOutline(speedtext, 0);
TextDrawSetProportional(speedtext, 1);
TextDrawSetShadow(speedtext, 1);
TextDrawHideForPlayer(playerid, speedtext);
SetPVarInt(playerid, "SpeedDraw", _:speedtext);
new Text:vehtext = TextDrawCreate(504.000000, 332.000000, "Vehicle Name");
TextDrawBackgroundColor(vehtext, 255);
TextDrawFont(vehtext, 1);
TextDrawLetterSize(vehtext, 0.400000, 1.300000);
TextDrawColor(vehtext, -1);
TextDrawSetOutline(vehtext, 0);
TextDrawSetProportional(vehtext, 1);
TextDrawSetShadow(vehtext, 1);
TextDrawHideForPlayer(playerid, vehtext);
SetPVarInt(playerid, "VehDraw", _:vehtext);
//MileAge
new Text:vehmiletext = TextDrawCreate(504.000000, 310.000000, "Miles");
TextDrawBackgroundColor(vehmiletext, 255);
TextDrawFont(vehmiletext, 1);
TextDrawLetterSize(vehmiletext, 0.400000, 1.300000);
TextDrawColor(vehmiletext, -1);
TextDrawSetOutline(vehmiletext, 0);
TextDrawSetProportional(vehmiletext, 1);
TextDrawSetShadow(vehmiletext, 1);
TextDrawHideForPlayer(playerid, vehmiletext);
SetPVarInt(playerid, "VehMileDraw", _:vehmiletext);
query[0] = 0;//[512];
format(query,sizeof(query),"SELECT `id`,`model`,`colour1`,`colour2`,`locktype`,`locked`,`fuel`,`tirestatus`,`doorstatus`,`lightstatus`,`X`,`Y`,`Z`,`Angle`,`plate`,`hp`,`panelstatus`,`paintjob`,`flags`,`mileage`,`impoundprice`,`comp0`,`comp1`,`comp2`,`comp3`,`comp4`,`comp5`,`comp6`,`comp7`,`comp8`,`comp9`,`comp10`,`comp11`,`comp12`,`impoundprice` FROM `playercars` WHERE `owner` = %d",GetPVarInt(playerid, "CharID"));
mysql_function_query(g_mysql_handle, query, true, "onPlayerLoadVehicles", "d",playerid);
}
//CODE2
vehOnPlayerDisconnect(playerid, reason) {
#pragma unused reason
DestroyProgressBar(Bar:GetPVarInt(playerid,"FuelBar"));
TextDrawDestroy(Text:GetPVarInt(playerid, "SpeedDraw"));
TextDrawDestroy(Text:GetPVarInt(playerid, "VehDraw"));
TextDrawDestroy(Text:GetPVarInt(playerid, "VehMileDraw"));
new lcar = -1;
if(IsPlayerInAnyVehicle(playerid)) {
new carid = GetPlayerVehicleID(playerid);
new c = -1;
new index = -1;
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER) {
while((c = findPlayerCar(playerid, ++index)) != -1) {
if(c == carid) {
lcar = index;
break;
}
}
}
}
//CODE3/4
if(GetPVarInt(playerid, "FuelShown") == 1) {
new Bar:bar = Bar:GetPVarInt(playerid, "FuelBar");
if(bar != INVALID_BAR_ID) {
HideProgressBarForPlayer(playerid, bar);
}
DeletePVar(playerid, "FuelShown");
}
}
//CODE5/6/7
if(!IsABicycle(newmodel))
{
new Bar:fuelbar = Bar:GetPVarInt(playerid, "FuelBar");
if(fuelbar != INVALID_BAR_ID) {
SetProgressBarValue(fuelbar, VehicleInfo[newcar][EVFuel]);
SetPVarInt(playerid, "FuelShown", 1);
ShowProgressBarForPlayer(playerid, fuelbar);
}
//CODE8/9
new playerid = GetVehicleDriver(i);
if(playerid != INVALID_PLAYER_ID && IsACar(GetVehicleModel(i))) {
if(GetPVarInt(playerid, "FuelShown") == 1) {
new Bar:fuelbar = Bar:GetPVarInt(playerid, "FuelBar");
SetProgressBarValue(fuelbar, VehicleInfo[i][EVFuel]);
UpdateProgressBar(fuelbar, playerid);
}
}
}
}
Thank you!!

