24.01.2011, 03:25
Hey im trying to make a fuel progress bar for my server but i keep getting these errors
So on and so on like 23 errors all saying the same thing, heres the code
Yes i know it has something to do with the gas progress bar id but i cant figure out what, any help would be greatly appreciated!
Код:
(1197) : error 035: argument type mismatch (argument 2) (1214) : error 035: argument type mismatch (argument 1) (1215) : error 035: argument type mismatch (argument 1) (1220) : error 035: argument type mismatch (argument 1) (1221) : error 035: argument type mismatch (argument 1) (1225) : error 035: argument type mismatch (argument 1) (1226) : error 035: argument type mismatch (argument 1)
Код:
Line 1197
SetProgressBarValue(gGas[playerid], gas);
Lines 1214 and up
public BenzinUpdate()
{
for(new i=0; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
new vehicle = GetPlayerVehicleID(i);
if(IsPlayerInAnyVehicle(i) == 1)
{
if(gGas[vehicle] >= 0 && gGas[vehicle] <= 3)
{
SetProgressBarValue(gas, 0.0);
ShowProgressBarForAll(gas);
TogglePlayerControllable(i, 0);
}
else if(gGas[vehicle] >= 0 && gGas[vehicle] <= 10)
{
SetProgressBarValue(gas, 10.0);
ShowProgressBarForAll(gas);
}
else if(gGas[vehicle] >= 10 && gGas[vehicle] <= 20)
{
SetProgressBarValue(gas, 20.0);
ShowProgressBarForAll(gas);
}
else if(gGas[vehicle] >= 20 && gGas[vehicle] <= 30)
{
SetProgressBarValue(gas, 30.0);
ShowProgressBarForAll(gas);
}
else if(gGas[vehicle] >= 30 && gGas[vehicle] <= 40)
{
SetProgressBarValue(gas, 40.0);
ShowProgressBarForAll(gas);
}
else if(gGas[vehicle] >= 40 && gGas[vehicle] <= 50)
{
SetProgressBarValue(gas, 50.0);
ShowProgressBarForAll(gas);
}
else if(gGas[vehicle] >= 50 && gGas[vehicle] <= 60)
{
SetProgressBarValue(gas, 60.0);
ShowProgressBarForAll(gas);
}
else if(gGas[vehicle] >= 60 && gGas[vehicle] <= 70)
{
SetProgressBarValue(gas, 70.0);
ShowProgressBarForAll(gas);
}
else if(gGas[vehicle] >= 70 && gGas[vehicle] <= 80)
{
SetProgressBarValue(gas, 80.0);
ShowProgressBarForAll(gas);
}
else if(gGas[vehicle] >= 80 && gGas[vehicle] <= 90)
{
SetProgressBarValue(gas, 90.0);
ShowProgressBarForAll(gas);
}
else if(gGas[vehicle] >= 90 && gGas[vehicle] <= 100)
{
SetProgressBarValue(gas, 100.0);
ShowProgressBarForAll(gas);
}
}
}
}
return 1;
}



Edit Button. :P