SA-MP Forums Archive
Error 017: undefined symbol - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP (https://sampforum.blast.hk/forumdisplay.php?fid=3)
+--- Forum: Client Support (https://sampforum.blast.hk/forumdisplay.php?fid=16)
+--- Thread: Error 017: undefined symbol (/showthread.php?tid=409556)



Error 017: undefined symbol - Smikkeltoetje - 22.01.2013

I tried to add a new command to the script (zCMD)

This is the code i used.
Код:
CMD:aveh(playerid, params[])
{
    if(!IsPlayerAdmin(playerid)) return 0;
    new type,color,color2,Float:cPos[4];
    if(sscanf(params, "iii", type,color,color2) return SendClientMessage(playerid,COLOR_RED, "/aveh [model] [color] [color]");
    if(type < 400 || type > 611) return SendClientMessage(playerid,COLOR_RED, "vehicle IDs between 400 - 611!");
    if(color> 255 || color< 0) return SendClientMessage(playerid, 0xFFFFFF, "Car color ID's: 0-255");
    if(color2> 255 || color2< 0) return SendClientMessage(playerid, 0xFFFFFF, "Car color ID's: 0-255");
    GetPlayerPos(playerid, cPos[0], cPos[1], cPos[2]);
    GetPlayerFacingAngle(playerid, cPos[3]);
    CreateVehicle(vehicle, cPos[0], cPos[1]-3, cPos[2], cPos[3], color, color2, -1);
    return 1;
}
So far so good, but when i try to compile it
It always gives me 1 error!

Error Code:

Код:
 Error 017: undefined symbol "vehicle"
What did i do to solve this?
Deleted and re-installed all files.
Updates to the latest version
Tried to change "vehicle" and even tried to delete it,...
If i delete it and i go IG it says i spawned it and it says the command doesn't excist...

I hope anyone knows a solution for this...


Re: Error 017: undefined symbol - Junkyard145 - 22.01.2013

Make sure you have it defined like #Define somethingsomething


Re: Error 017: undefined symbol - Smikkeltoetje - 22.01.2013

Quote:
Originally Posted by Junkyard145
Посмотреть сообщение
Make sure you have it defined like #Define somethingsomething
#Define Vehicle
or more like make a Define aveh for the command?
(Must be a stupid question sorry,...)


Re: Error 017: undefined symbol - Junkyard145 - 22.01.2013

Quote:
Originally Posted by Smikkeltoetje
Посмотреть сообщение
#Define Vehicle
or more like make a Define aveh for the command?
(Must be a stupid question sorry,...)
If it says Undefined Symbol Vehicle then yes try #Define vehicle or #Define Vehicle


Re: Error 017: undefined symbol - Smikkeltoetje - 22.01.2013

Quote:
Originally Posted by Junkyard145
Посмотреть сообщение
If it says Undefined Symbol Vehicle then yes try #Define vehicle or #Define Vehicle
Getting 5 more errors if i add #define vehicle or #define <vehicle>
awww


Re: Error 017: undefined symbol - Erwin. - 22.01.2013

Not sure if this is right,but how about if you use this?

pawn Код:
new vehicle;
Edit:And this the wrong section to post,this section is only for ,how to install sa-mp. If you have any questions help what is releated to Scripting, Post in this section:
http://forum.sa-mp.com/forumdisplay.php?f=12


Re: Error 017: undefined symbol - Gortex - 22.01.2013

isnt this the wrong section? -_________-


Re: Error 017: undefined symbol - Gangster-rocks - 22.01.2013

pawn Код:
CMD:aveh(playerid, params[])
{
    if(!IsPlayerAdmin(playerid)) return 0;
    new type,color,color2,Float:cPos[4];
    if(sscanf(params, "iii", type,color,color2) return SendClientMessage(playerid,COLOR_RED, "/aveh [model] [color] [color]");
    if(type < 400 || type > 611) return SendClientMessage(playerid,COLOR_RED, "vehicle IDs between 400 - 611!");
    if(color> 255 || color< 0) return SendClientMessage(playerid, 0xFFFFFF, "Car color ID's: 0-255");
    if(color2> 255 || color2< 0) return SendClientMessage(playerid, 0xFFFFFF, "Car color ID's: 0-255");
    GetPlayerPos(playerid, cPos[0], cPos[1], cPos[2]);
    GetPlayerFacingAngle(playerid, cPos[3]);
    CreateVehicle(type, cPos[0], cPos[1]-3, cPos[2], cPos[3], color, color2, -1);
    return 1;
}
lawl