27.11.2012, 15:07
I have this errors:
pawn Код:
C:\Users\Jamie\Desktop\SAMP\gamemodes\SFRP.pwn(186) : error 012: invalid function call, not a valid address
C:\Users\Jamie\Desktop\SAMP\gamemodes\SFRP.pwn(186) : warning 215: expression has no effect
C:\Users\Jamie\Desktop\SAMP\gamemodes\SFRP.pwn(186) : error 001: expected token: ";", but found ")"
C:\Users\Jamie\Desktop\SAMP\gamemodes\SFRP.pwn(186) : error 029: invalid expression, assumed zero
C:\Users\Jamie\Desktop\SAMP\gamemodes\SFRP.pwn(186) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
4 Errors.
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if (newstate == 2)
{
if (oldstate == 1)
{
new
vID = GetPlayerVehicleID(playerid);
if (!IsRentedCar(vID)) // Line 186
{
new String[128];
format(String, 128, "~p~~n~rent cost: ~b~%d~n~~w~type ~b~/rentcar~n~~w~to exit it type~n~~p~/exitrental", RENT_COST);
GameTextForPlayer(playerid, String, 30000, 4);
SendClientMessage(playerid, -1, "Type {3399CC}/exitrental{FFFFFF} to exit this rental car.");
TogglePlayerControllable(playerid, 0);
}
else if (IsRentedCar(vID))
{
if (GetPVarInt(playerid, "CarRentID") == vID)
{
return SendClientMessage(playerid, -1, "{3399CC}Welcome{FFFFFF} to your rented car.");
}
else if (GetPVarInt(playerid, "CarRentID") != vID)
{
new
String[128];
format(String, 128, "This vehicle is rented by: {3399CC}%s{FFFFFF}", RentedBy[vID]);
SendClientMessage(playerid, -1, String);
SendClientMessage(playerid, -1, "Use {3399CC}/exitrental{FFFFFF} to exit this vehicle.");
return 1;
}
}
}
}
}
return 0;
}