SA-MP Forums Archive
Script Error - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Script Error (/showthread.php?tid=116378)



Script Error - blubber - 28.12.2009

Quote:

public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/mycommand", cmdtext, true, 10) == 0)
{
// Do something here
return 1;
}
if(strcmp(cmdtext, "/infernus", true) == 0)
{ new Float, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
new Float:Angle;
GetPlayerFacingAngle(playerid,Angle);
CreateVehicle(410, x, y, z+0.1, Angle, 0, 1, 90000);
PutPlayerInVehicle(playerid, 410, 0);
return 1;
}
return 0;
}

Quote:

C:\Users\Willem\Desktop\GTA multiplayer\filterscripts\infernus.pwn(1) : warning 235: public function lacks forward declaration (symbol "OnPlayerCommandText")
C:\Users\Willem\Desktop\GTA multiplayer\filterscripts\infernus.pwn(3) : error 017: undefined symbol "strcmp"
C:\Users\Willem\Desktop\GTA multiplayer\filterscripts\infernus.pwn(5) : error 017: undefined symbol "GetPlayerPos"
C:\Users\Willem\Desktop\GTA multiplayer\filterscripts\infernus.pwn(7) : error 017: undefined symbol "GetPlayerFacingAngle"
C:\Users\Willem\Desktop\GTA multiplayer\filterscripts\infernus.pwn( : error 017: undefined symbol "CreateVehicle"
C:\Users\Willem\Desktop\GTA multiplayer\filterscripts\infernus.pwn(6) : warning 203: symbol is never used: "Angle"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


4 Errors.

Hello, this is my first post, first I wanted to say that I'm glad to find this forum, because I'm a noob in scripting. And learning hard to be a good scripter. I wanted to spawn a car in front of your character. Could some one please explain me what is wrong with it.


Re: Script Error - LarzI - 28.12.2009

Check out the wiki for scripting tutorials.
You need a main() function, and you need to include a_samp.inc
pawn Код:
#include <a_samp>