D:\ffff\gamemodes\fast.pwn(1326) : error 003: declaration of a local variable must appear in a compound block D:\ffff\gamemodes\fast.pwn(1326) : error 017: undefined symbol "string" D:\ffff\gamemodes\fast.pwn(1326) : warning 215: expression has no effect D:\ffff\gamemodes\fast.pwn(1326) : error 001: expected token: ";", but found "]" D:\ffff\gamemodes\fast.pwn(1326) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors. |
CMD:sethp(playerid, params[])
{
if(PlayerInfo[playerid][pRank] == 2.6)
new string[128],targetid,Float:Heal,Pname[MAX_PLAYER_NAME],Iname[MAX_PLAYER_NAME];
GetPlayerName(playerid,Pname,sizeof(Pname));
GetPlayerName(targetid,Iname,sizeof(Iname));
if(sscanf(params, "ud", targetid,Heal))
{
SendClientMessage(playerid,-1,"USAGE: /SetHealth (Player Name/ID) (Health)");
return 1;
}
if(!IsPlayerConnected(targetid))
{
format(string,sizeof(string),"The Player ID (%d) is not connected to the server. You cannot heal them.",targetid);
SendClientMessage(playerid,-1,string);
return 1;
}
SetPlayerHealth(playerid,heal);
format(string,sizeof(string),"You Have Set %s(%d) Health To %d",Iname,targetid,Heal);
SendClientMessage(playerid,-1,string);
format(string,sizeof(string),"%s(%d) Has Set Your Health To %d",Pname,playerid,Heal);
SendClientMessage(targetid,-1,string);
SetPlayerHealth(targetid, health);
}
return 1;
}
D:\ffff\gamemodes\fast.pwn(400) : error 017: undefined symbol "aVehicleNames" D:\ffff\gamemodes\fast.pwn(400) : warning 215: expression has no effect D:\ffff\gamemodes\fast.pwn(400) : error 001: expected token: ";", but found "]" D:\ffff\gamemodes\fast.pwn(400) : error 029: invalid expression, assumed zero D:\ffff\gamemodes\fast.pwn(400) : fatal error 107: too many error messages on one line |
stock GetVehicleModelID(vehiclename[])
{
for(new i = 0; i < 211; i++)
{
if(strfind(aVehicleNames[i], vehiclename, true) != -1)
return i + 400;
}
return -1;
}
if(strfind(aVehicleNames[i], vehiclename, true) != -1) |
if(PlayerInfo[playerid][pRank] == 2.6) {
D:\ffff\gamemodes\fast.pwn(400) : error 017: undefined symbol "aVehicleNames" D:\ffff\gamemodes\fast.pwn(400) : warning 215: expression has no effect D:\ffff\gamemodes\fast.pwn(400) : error 001: expected token: ";", but found "]" D:\ffff\gamemodes\fast.pwn(400) : error 029: invalid expression, assumed zero D:\ffff\gamemodes\fast.pwn(400) : fatal error 107: too many error messages on one line |
new aVehicleNames[][] = {
"Landstalker","Bravura","Buffalo","Linerunner","Perennial","Sentinel","Dumper","Firetruck","Trashmaster","Stretch","Manana","Infernus",
"Voodoo","Pony","Mule","Cheetah","Ambulance","Leviathan","Moonbeam","Esperanto","Taxi","Washington","Bobcat","Mr Whoopee","BF Injection",
"Hunter","Premier","Enforcer","Securicar","Banshee","Predator","Bus","Rhino","Barracks","Hotknife","Trailer","Previon","Coach","Cabbie",
"Stallion","Rumpo","RC Bandit","Romero","Packer","Monster","Admiral","Squalo","Seasparrow","Pizzaboy","Tram","Trailer","Turismo","Speeder",
"Reefer","Tropic","Flatbed","Yankee","Caddy","Solair","Berkley's RC Van","Skimmer","PCJ-600","Faggio","Freeway","RC Baron","RC Raider",
"Glendale","Oceanic","Sanchez","Sparrow","Patriot","Quad","Coastguard","Dinghy","Hermes","Sabre","Rustler","ZR3 50","Walton","Regina",
"Comet","BMX","Burrito","Camper","Marquis","Baggage","Dozer","Maverick","News Chopper","Rancher","FBI Rancher","Virgo","Greenwood",
"Jetmax","Hotring","Sandking","Blista Compact","Police Maverick","Boxville","Benson","Mesa","RC Goblin","Hotring Racer A","Hotring Racer B",
"Bloodring Banger","Rancher","Super GT","Elegant","Journey","Bike","Mountain Bike","Beagle","Cropdust","Stunt","Tanker","RoadTrain",
"Nebula","Majestic","Buccaneer","Shamal","Hydra","FCR-900","NRG-500","HPV1000","Cement Truck","Tow Truck","Fortune","Cadrona","FBI Truck",
"Willard","Forklift","Tractor","Combine","Feltzer","Remington","Slamvan","Blade","Freight","Streak","Vortex","Vincent","Bullet","Clover",
"Sadler","Firetruck","Hustler","Intruder","Primo","Cargobob","Tampa","Sunrise","Merit","Utility","Nevada","Yosemite","Windsor","Monster A",
"Monster B","Uranus","Jester","Sultan","Stratum","Elegy","Raindance","RC Tiger","Flash","Tahoma","Savanna","Bandito","Freight","Trailer",
"Kart","Mower","Duneride","Sweeper","Broadway","Tornado","AT-400","DFT-30","Huntley","Stafford","BF-400","Newsvan","Tug","Trailer A","Emperor",
"Wayfarer","Euros","Hotdog","Club","Trailer B","Trailer C","Andromada","Dodo","RC Cam","Launch","Police Car (LSPD)","Police Car (SFPD)",
"Police Car (LVPD)","Police Ranger","Picador","S.W.A.T. Van","Alpha","Phoenix","Glendale","Sadler","Luggage Trailer A","Luggage Trailer B",
"Stair Trailer","Boxville","Farm Plow","Utility Trailer"
};
stock GetVehicleModelID(vehiclename[]) { for(new i = 0; i < 211; i++) { if(strfind(aVehicleNames[i], vehiclename, true) != -1) return i + 400; } return -1; } stock GetXYInFrontOfPlayer(playerid, &Float2, &Float:y2, Float:distance) { new Float:a; GetPlayerPos(playerid, x2, y2, a); GetPlayerFacingAngle(playerid, a); if(GetPlayerVehicleID(playerid)) { GetVehicleZAngle(GetPlayerVehicleID(playerid), a); } x2 += (distance * floatsin(-a, degrees)); y2 += (distance * floatcos(-a, degrees)); } |
CMD:v(playerid, params[]) { if(PlayerInfo[playerid][pRank] == 2.6) { #endif new Vehicle[50]; if(!sscanf(params, "s[50]", Vehicle)) { new string[128], Float:Pos[4]; GetPlayerPos(playerid, Pos[0],Pos[1],Pos[2]); GetPlayerFacingAngle(playerid, Pos[3]); new veh = GetVehicleModelID(Vehicle); if(veh < 400 || veh > 611) return SendClientMessage(playerid, C_RED, "This is not a valid vehicle name! Please try again "); if(IsPlayerInAnyVehicle(playerid)) { DestroyVehicle(GetPlayerVehicleID(playerid)); } GetXYInFrontOfPlayer(playerid, Pos[0], Pos[1], 5); new PVeh = CreateVehicle(veh, Pos[0], Pos[1], Pos[2], Pos[3]+90, -1, -1, -1); LinkVehicleToInterior(PVeh, GetPlayerInterior(playerid)); SetVehicleVirtualWorld(PVeh, GetPlayerVirtualWorld(playerid)); format(string, sizeof string, "You spawned a %s. ID: %i. ", aVehicleNames[veh - 400], veh); SendClientMessage(playerid, C_GREEN, string); } else return SendClientMessage(playerid, C_GREEN, "Usage: /v [vehiclename] "); return 1; } CMD:vdestroy(playerid, params[]) { if(PlayerInfo[playerid][pRank] == 2.6) { new testcar= GetPlayerVehicleID(playerid); SendClientMessage(playerid, 0xFFFFFFFF, "You have deleted a car!!"); DestroyVehicle(testcar); return 1; } |
D:\ffff\gamemodes\fast.pwn(404) : error 017: undefined symbol "aVehicleNames" D:\ffff\gamemodes\fast.pwn(404) : warning 215: expression has no effect D:\ffff\gamemodes\fast.pwn(404) : error 001: expected token: ";", but found "]" D:\ffff\gamemodes\fast.pwn(404) : error 029: invalid expression, assumed zero D:\ffff\gamemodes\fast.pwn(404) : fatal error 107: too many error messages on one line |
if(strfind(aVehicleNames[i], vehiclename, true) != -1) |
stock GetVehicleModelID(vehiclename[]) { for(new i = 0; i < 211; i++) { if(strfind(aVehicleNames[i], vehiclename, true) != -1) return i + 400; } return -1; } |
new aVehicleNames[][] = {
"Landstalker","Bravura","Buffalo","Linerunner","Perennial","Sentinel","Dumper","Firetruck","Trashmaster","Stretch","Manana","Infernus",
"Voodoo","Pony","Mule","Cheetah","Ambulance","Leviathan","Moonbeam","Esperanto","Taxi","Washington","Bobcat","Mr Whoopee","BF Injection",
"Hunter","Premier","Enforcer","Securicar","Banshee","Predator","Bus","Rhino","Barracks","Hotknife","Trailer","Previon","Coach","Cabbie",
"Stallion","Rumpo","RC Bandit","Romero","Packer","Monster","Admiral","Squalo","Seasparrow","Pizzaboy","Tram","Trailer","Turismo","Speeder",
"Reefer","Tropic","Flatbed","Yankee","Caddy","Solair","Berkley's RC Van","Skimmer","PCJ-600","Faggio","Freeway","RC Baron","RC Raider",
"Glendale","Oceanic","Sanchez","Sparrow","Patriot","Quad","Coastguard","Dinghy","Hermes","Sabre","Rustler","ZR3 50","Walton","Regina",
"Comet","BMX","Burrito","Camper","Marquis","Baggage","Dozer","Maverick","News Chopper","Rancher","FBI Rancher","Virgo","Greenwood",
"Jetmax","Hotring","Sandking","Blista Compact","Police Maverick","Boxville","Benson","Mesa","RC Goblin","Hotring Racer A","Hotring Racer B",
"Bloodring Banger","Rancher","Super GT","Elegant","Journey","Bike","Mountain Bike","Beagle","Cropdust","Stunt","Tanker","RoadTrain",
"Nebula","Majestic","Buccaneer","Shamal","Hydra","FCR-900","NRG-500","HPV1000","Cement Truck","Tow Truck","Fortune","Cadrona","FBI Truck",
"Willard","Forklift","Tractor","Combine","Feltzer","Remington","Slamvan","Blade","Freight","Streak","Vortex","Vincent","Bullet","Clover",
"Sadler","Firetruck","Hustler","Intruder","Primo","Cargobob","Tampa","Sunrise","Merit","Utility","Nevada","Yosemite","Windsor","Monster A",
"Monster B","Uranus","Jester","Sultan","Stratum","Elegy","Raindance","RC Tiger","Flash","Tahoma","Savanna","Bandito","Freight","Trailer",
"Kart","Mower","Duneride","Sweeper","Broadway","Tornado","AT-400","DFT-30","Huntley","Stafford","BF-400","Newsvan","Tug","Trailer A","Emperor",
"Wayfarer","Euros","Hotdog","Club","Trailer B","Trailer C","Andromada","Dodo","RC Cam","Launch","Police Car (LSPD)","Police Car (SFPD)",
"Police Car (LVPD)","Police Ranger","Picador","S.W.A.T. Van","Alpha","Phoenix","Glendale","Sadler","Luggage Trailer A","Luggage Trailer B",
"Stair Trailer","Boxville","Farm Plow","Utility Trailer"
};
new aVehicleNames[][] = { "Landstalker","Bravura","Buffalo","Linerunner","Pe rennial","Sentinel","Dumper","Firetruck","Trashmas ter","Stretch","Manana","Infernus", "Voodoo","Pony","Mule","Cheetah","Ambulance","Levi athan","Moonbeam","Esperanto","Taxi","Washington", "Bobcat","Mr Whoopee","BF Injection", "Hunter","Premier","Enforcer","Securicar","Banshee ","Predator","Bus","Rhino","Barracks","Hotknife"," Trailer","Previon","Coach","Cabbie", "Stallion","Rumpo","RC Bandit","Romero","Packer","Monster","Admiral","Squ alo","Seasparrow","Pizzaboy","Tram","Trailer","Tur ismo","Speeder", "Reefer","Tropic","Flatbed","Yankee","Caddy","Sola ir","Berkley's RC Van","Skimmer","PCJ-600","Faggio","Freeway","RC Baron","RC Raider", "Glendale","Oceanic","Sanchez","Sparrow","Patriot" ,"Quad","Coastguard","Dinghy","Hermes","Sabre","Ru stler","ZR3 50","Walton","Regina", "Comet","BMX","Burrito","Camper","Marquis","Baggag e","Dozer","Maverick","News Chopper","Rancher","FBI Rancher","Virgo","Greenwood", "Jetmax","Hotring","Sandking","Blista Compact","Police Maverick","Boxville","Benson","Mesa","RC Goblin","Hotring Racer A","Hotring Racer B", "Bloodring Banger","Rancher","Super GT","Elegant","Journey","Bike","Mountain Bike","Beagle","Cropdust","Stunt","Tanker","RoadTr ain", "Nebula","Majestic","Buccaneer","Shamal","Hydra"," FCR-900","NRG-500","HPV1000","Cement Truck","Tow Truck","Fortune","Cadrona","FBI Truck", "Willard","Forklift","Tractor","Combine","Feltzer" ,"Remington","Slamvan","Blade","Freight","Streak", "Vortex","Vincent","Bullet","Clover", "Sadler","Firetruck","Hustler","Intruder","Primo", "Cargobob","Tampa","Sunrise","Merit","Utility","Ne vada","Yosemite","Windsor","Monster A", "Monster B","Uranus","Jester","Sultan","Stratum","Elegy","R aindance","RC Tiger","Flash","Tahoma","Savanna","Bandito","Freig ht","Trailer", "Kart","Mower","Duneride","Sweeper","Broadway","To rnado","AT-400","DFT-30","Huntley","Stafford","BF-400","Newsvan","Tug","Trailer A","Emperor", "Wayfarer","Euros","Hotdog","Club","Trailer B","Trailer C","Andromada","Dodo","RC Cam","Launch","Police Car (LSPD)","Police Car (SFPD)", "Police Car (LVPD)","Police Ranger","Picador","S.W.A.T. Van","Alpha","Phoenix","Glendale","Sadler","Luggag e Trailer A","Luggage Trailer B", "Stair Trailer","Boxville","Farm Plow","Utility Trailer" }; |
stock GetVehicleModelID(vehiclename[]) { for(new i = 0; i < 211; i++) { if(strfind(aVehicleNames[i], vehiclename, true) != -1) return i + 400; } return -1; } |
if i had a dollar for everytime i've reported a thread for having a nondescriptive title, i'd be broke
Код:
if(PlayerInfo[playerid][pRank] == 2.6) { as for the second one, the first error solves your problem |