Undefined Symbol
#1

I have this line of script at the top of my filterscript:

Quote:

new DETWASH,DETHUNT,SWATENFORCE,SWATWASH,SWATRANCH,FBI RANCH,FBIPRE,EMSAMBU,EMSRANCH,EMSAIR,CORBUS,CORTRA NS,DMV,FDENG,FDAMBU,FDRANCH;

But when i do this:
Quote:

new vehicle;
vehicle = GetPlayerVehicleID(playerid);
if (vehicle == DETWASH)
{
SendClientMessage(playerid,0x828282FF,"Vehicle:Was hington Owner: SAPD DET");
}
if (vehicle == DETHUNT)
{
SendClientMessage(playerid,0x828282FF,"Vehicle:Hun tley Owner: SAPD DET");
}
if (vehicle == SWATENFORCE)
{
SendClientMessage(playerid,0x828282FF,"Vehicle:Enf orcer Owner: SWAT");
}
if (vehicle == SWATWASH)
{
SendClientMessage(playerid,0x828282FF,"Vehicle:Was hington Owner: SWAT");
}
if (vehicle == SWATRANCH)
{
SendClientMessage(playerid,0x828282FF,"Vehicle:Fed eral Rancher Owner: SWAT");
}
if (vehicle == FBIRANCH)
{
SendClientMessage(playerid,0x828282FF,"Vehicle:Fed eral Rancher Owner: FBI");
}
if (vehicle == FBIPRE)
{
SendClientMessage(playerid,0x828282FF,"Vehicle:Fed eral Rancher Owner: FBI");
}
if (vehicle == EMSAMBU)
{
SendClientMessage(playerid,0x828282FF,"Vehicle:Amb ulance Owner: FDSA EMS");
}
if (vehicle == EMSAIR)
{
SendClientMessage(playerid,0x828282FF,"Vehicle:Rai ndance Owner: FDSA EMS");
}
if (vehicle == CORBUS)
{
SendClientMessage(playerid,0x828282FF,"Vehicle:Bus Owner: Corrections");
}
if (vehicle == CORTRANS)
{
SendClientMessage(playerid,0x828282FF,"Vehicle:Sec uricar Owner: Corrections");
}
if (vehicle == DMV)
{
SendClientMessage(playerid,0x828282FF,"Vehicle:Man ana Owner: DMV");
}
if (vehicle == FDENG)
{
SendClientMessage(playerid,0x828282FF,"Vehicle:Fir e Engine Owner: FDSA");
}
if (vehicle == FDAMBU)
{
SendClientMessage(playerid,0x828282FF,"Vehicle:Amb ulance Owner: FDSA EMS");
}
if (vehicle == FDRANCH)
{
SendClientMessage(playerid,0x828282FF,"Vehicle:Fed eral Rancher Owner: FDSA");
}

I get undefined errors:

Quote:

C:/ Scripts\Filterscripts\vehicles.pwn(153) : error 017: undefined symbol "DETWASH"
D:\Scripts\Filterscripts\vehicles.pwn(157) : error 017: undefined symbol "DETHUNT"
D:\Scripts\Filterscripts\vehicles.pwn(161) : error 017: undefined symbol "SWATENFORCE"
D:\Scripts\Filterscripts\vehicles.pwn(165) : error 017: undefined symbol "SWATWASH"
D:\Scripts\Filterscripts\vehicles.pwn(169) : error 017: undefined symbol "SWATRANCH"
D:\Scripts\Filterscripts\vehicles.pwn(173) : error 017: undefined symbol "FBIRANCH"
D:\Scripts\Filterscripts\vehicles.pwn(177) : error 017: undefined symbol "FBIPRE"
D:\Scripts\Filterscripts\vehicles.pwn(181) : error 017: undefined symbol "EMSAMBU"
D:\Scripts\Filterscripts\vehicles.pwn(185) : error 017: undefined symbol "EMSAIR"
D:\Scripts\Filterscripts\vehicles.pwn(189) : error 017: undefined symbol "CORBUS"
D:\Scripts\Filterscripts\vehicles.pwn(193) : error 017: undefined symbol "CORTRANS"
D:\Scripts\Filterscripts\vehicles.pwn(197) : error 017: undefined symbol "DMV"
D:\Scripts\Filterscripts\vehicles.pwn(201) : error 017: undefined symbol "FDENG"
D:\Scripts\Filterscripts\vehicles.pwn(205) : error 017: undefined symbol "FDAMBU"
D:\Scripts\Filterscripts\vehicles.pwn(209) : error 017: undefined symbol "FDRANCH"

Reply
#2

new DETWASH,DETHUNT,SWATENFORCE,SWATWASH,SWATRANCH,FBI RANCH,FBIPRE,EMSAMBU,EMSRANCH,EMSAIR,CORBUS,CORTRA NS,DMV,FDENG,FDAMBU,FDRANCH;

Ok so under ongamemodeinit where you are making your cars you need to do this


DETWASH= AddStaticVehicle(421, x, y, z, 120, 1, 1);


Change x, y ,z to your cordinates you want the car to spawn at, 120 is the rotation angle and 1 and 1 are colors.
Reply
#3

Did that:

Quote:

DETWASH[0] = AddStaticVehicle(421,621.8666,-609.6534,17.0736,1.8260,0,0); // Detective Washington #1
DETWASH[1] = AddStaticVehicle(421,624.8309,-609.3682,16.7931,3.8912,0,0); // Detective Washington #2
DETWASH[2] = AddStaticVehicle(421,628.0089,-609.2944,16.4314,358.7540,0,0); // Detective Washington #3
DETWASH[3] = AddStaticVehicle(421,630.8695,-609.0350,16.2184,358.8419,0,0); // Detective Washington #4
DETHUNT[0] = AddStaticVehicle(579,635.2885,-608.6282,16.2660,2.1587,0,0); // Detective Huntley #1
DETHUNT[1] = AddStaticVehicle(579,639.1840,-608.4658,16.2683,2.0776,0,0); // Detective Huntley #2
FBIRANCH[0] = AddStaticVehicle(490,1295.0852,-990.3503,32.7629,92.4820,0,0); // LS FBI Rancher #1
FBIRANCH[1] = AddStaticVehicle(490,1295.0177,-986.4385,32.8299,90.9629,0,0); // LS FBI Rancher #2
FBIPRE[0] = AddStaticVehicle(426,1295.0920,-979.8218,32.4386,94.0449,0,0); // LS FBI premier #1
FBIPRE[1] = AddStaticVehicle(426,1295.2073,-983.0118,32.4386,91.2547,0,0); // LS FBI premier #2
SWATENFORCE[0] = AddStaticVehicle(427,1525.1960,-1461.4767,9.6319,180.4600,0,1); // LS SWAT Enorcer #1
SWATENFORCE[1] = AddStaticVehicle(427,1521.4761,-1461.7059,9.6319,181.0959,0,1); // LS SWAT Enorcer #2
SWATWASH[0] = AddStaticVehicle(421,1518.0098,-1461.8198,9.3826,183.7835,0,20); // LS SWAT Washington #1
SWATWASH[1] = AddStaticVehicle(421,1514.9381,-1462.2977,9.3825,185.4700,0,20); // LS SWAT Washington #2
SWATRANCH[0] = AddStaticVehicle(490,1512.9244,-1479.8085,9.6274,273.0120,0,20); // LS SWAT Rancher
EMSAMBU[0] = AddStaticVehicle(416,1177.3402,-1308.3691,14.0113,268.0056,1,3); // AS Ambulance #1
EMSAMBU[1] = AddStaticVehicle(416,1178.4551,-1337.6980,14.0018,269.8570,1,3); // AS Ambulance #2
EMSRANCH[0] = AddStaticVehicle(490,1182.2931,-1332.4777,13.7080,356.9944,1,1); // AS Rancher #1
EMSRANCH[1] = AddStaticVehicle(490,1181.9563,-1315.2212,13.7052,180.1121,1,1); // AS Rancher #2
EMSAMBU[2] = AddStaticVehicle(416,2035.7941,-1441.7551,17.5109,178.2166,1,3); // CG Ambulance #1
EMSAMBU[3] = AddStaticVehicle(416,2035.9246,-1433.1664,17.2640,178.3316,1,3); // CG Ambulance #2
EMSRANCH[2] = AddStaticVehicle(490,2017.9858,-1410.1960,17.1206,93.3566,1,1); // CG Rancher #1
EMSRANCH[3] = AddStaticVehicle(490,2010.5087,-1410.4209,17.1200,91.9774,1,1); // CG Rancher #2
EMSAIR[0] = AddStaticVehicle(563,1160.0354,-1314.7369,32.2011,172.9206,0,3); // AS Medivac
DMV[0] = AddStaticVehicle(410,1196.2555,-1827.8425,13.0607,179.7596,6,1); // DMV Manana #1
DMV[1] = AddStaticVehicle(410,1199.2595,-1827.7750,13.0641,179.3739,6,1); // DMV Manana #2
DMV[2] = AddStaticVehicle(410,1202.1718,-1827.6760,13.0647,178.6843,6,1); // DMV Manana #3
CORBUS[0] = AddStaticVehicle(431,-1170.0410,-1051.3800,129.3805,359.8260,0,20); // Corrections Bus #1
CORBUS[1] = AddStaticVehicle(431,-1165.0210,-1051.5663,129.3748,1.1312,0,20); // Corrections Bus #2
CORTRANS[0] = AddStaticVehicle(428,-1159.6678,-1048.1869,129.4016,4.3921,0,20); // Corrections Transport #1
CORTRANS[1] = AddStaticVehicle(428,-1155.2963,-1047.9368,129.3985,5.4284,0,20); // Corrections Transport #2
FDENG[0] = AddStaticVehicle(407,593.6472,-1519.9049,15.3801,269.5251,3,1); // LSFD engine #1
FDENG[1] = AddStaticVehicle(407,593.5833,-1509.0504,15.4607,268.5606,3,1); // LSFD engine #2
FDENG[2] = AddStaticVehicle(407,602.3636,-1520.3181,15.2491,269.8719,3,1); // LSFD engine #3
FDENG[3] = AddStaticVehicle(407,602.2483,-1509.0443,15.2461,268.8361,3,1); // LSFD engine #4
FDAMBU[0] = AddStaticVehicle(416,601.0935,-1498.1406,15.2081,270.6042,1,3); // LSFD Ambulance #1
FDAMBU[1] = AddStaticVehicle(416,593.7993,-1498.0549,15.4087,270.1272,1,3); // LSFD Ambulance #2
FDRANCH[0] = AddStaticVehicle(490,611.7065,-1492.6406,14.9527,214.0362,3,3); // LSFD rancher

Reply
#4

pawn Код:
new DETWASH[4],DETHUNT[2],SWATENFORCE[2],SWATWASH[2],SWATRANCH[1],FBI RANCH[2],FBIPRE[2],EMSAMBU[4],EMSRANCH[4],EMSAIR[1],CORBUS[2],CORTRANS[2],DMV[3],FDENG[4],FDAMBU[2],FDRANCH[1];
try if you decide to add another DETWASH then make sure you change DETWASH[4] to DETWASH[5] you want to have it one number higher then the cars you are going to have with that.
Reply
#5

Quote:
Originally Posted by new121
Посмотреть сообщение
pawn Код:
new DETWASH[4],DETHUNT[2],SWATENFORCE[2],SWATWASH[2],SWATRANCH[1],FBI RANCH[2],FBIPRE[2],EMSAMBU[4],EMSRANCH[4],EMSAIR[1],CORBUS[2],CORTRANS[2],DMV[3],FDENG[4],FDAMBU[2],FDRANCH[1];
try if you decide to add another DETWASH then make sure you change DETWASH[4] to DETWASH[5] you want to have it one number higher then the cars you are going to have with that.
I did that and it still dont work
Reply
#6

look at this tutorial.
https://sampforum.blast.hk/showthread.php?tid=160810
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)