PDA

View Full Version : script errors


alexanderjb918
17/10/2014, 07:30 AM
D:\fcvrp\newupdate.pwn(38253) : error 003: declaration of a local variable must appear in a compound block
D:\fcvrp\newupdate.pwn(38253) : error 017: undefined symbol "vehicleid"
D:\fcvrp\newupdate.pwn(38253) : warning 215: expression has no effect
D:\fcvrp\newupdate.pwn(38254) : error 017: undefined symbol "vehicleid"
D:\fcvrp\newupdate.pwn(38261) : error 017: undefined symbol "vehicleid"
D:\fcvrp\newupdate.pwn(38262) : error 017: undefined symbol "vehicleid"
D:\fcvrp\newupdate.pwn(38269) : error 017: undefined symbol "vehicleid"
D:\fcvrp\newupdate.pwn(38270) : error 017: undefined symbol "vehicleid"
D:\fcvrp\newupdate.pwn(38271) : error 017: undefined symbol "vehicleid"

Code -
CMD:callsign(playerid, params[])
{
if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pMember] == 7 || PlayerInfo[playerid][pLeader] == 7)
new vehicleid;
vehicleid = GetPlayerVehicleID(playerid);
new string[32];
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessageEx(playerid, COLOR_GRAD1, "You are not in any Police Vehicle");
if (!IsACopCar(GetPlayerVehicleID(playerid)))
return SendClientMessageEx(playerid, COLOR_GRAD1, "You are not In a Police Vehicle");
if(vehiclecallsign[GetPlayerVehicleID(playerid)] == 1)
{
Delete3DTextLabel(vehicle3Dtext[vehicleid]);
vehiclecallsign[vehicleid] = 0;
SendClientMessage(playerid, COLOR_RED, "Callsign removed.");
return 1;
}
if(sscanf(params, "s[32]",string)) return SendErrorMessage(playerid, "You must enter a callsign.");
if(vehiclecallsign[GetPlayerVehicleID(playerid)] == 0)
{
vehicle3Dtext[vehicleid] = Create3DTextLabel(string, COLOR_WHITE, 0.0, 0.0, 0.0, 10.0, 0, 1);
Attach3DTextLabelToVehicle(vehicle3Dtext[vehicleid], vehicleid, 0.0, -2.8, 0.0);
vehiclecallsign[vehicleid] = 1;
}
return 1;
}

PawelQ
17/10/2014, 07:34 AM
You gotta to configure it to be used by your script, there's a lot of things from another script and you don't have them defined in yours

alexanderjb918
17/10/2014, 07:37 AM
I already that vehicleid defined

Rudy_
17/10/2014, 10:36 AM
show me your vehicleid, where have you defined it