16.07.2013, 10:42
Hello, trying to make a /enter /exit command with a pickup but I keep getting errors, I want the script as a filterscript.
Here are the errors:
This is the script with the errors:
Thanks!
Here are the errors:
Код:
C:\Documents and Settings\Administrator\Desktop\entercmd.pwn(7) : error 017: undefined symbol "infopickup" C:\Documents and Settings\Administrator\Desktop\entercmd.pwn(19) : error 017: undefined symbol "cmdtext" C:\Documents and Settings\Administrator\Desktop\entercmd.pwn(21) : error 017: undefined symbol "playerid" C:\Documents and Settings\Administrator\Desktop\entercmd.pwn(23) : error 017: undefined symbol "playerid" C:\Documents and Settings\Administrator\Desktop\entercmd.pwn(28) : error 017: undefined symbol "cmdtext" C:\Documents and Settings\Administrator\Desktop\entercmd.pwn(30) : error 017: undefined symbol "playerid" C:\Documents and Settings\Administrator\Desktop\entercmd.pwn(32) : error 017: undefined symbol "playerid" C:\Documents and Settings\Administrator\Desktop\entercmd.pwn(37) : error 030: compound statement not closed at the end of file (started at line 30) Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 8 Errors.
This is the script with the errors:
Код:
#include <a_samp>
new dollarpickup;
public OnFilterScriptInit()
{
infopickup = CreatePickup(1274,1,615.8764,-1512.9479,15.3576);
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == dollarpickup)
{
GameTextForPlayer(playerid,"~r~ /enter ~y~ to enter this building",3000,1);
}
return 1;
}
public OnPlayerCommandText()
{
if (strcmp("/enter", cmdtext, true, 6) == 0)
{
if(IsPlayerInRangeOfPoint(playerid,10,615.8764,-1512.9479,15.3576))
{
SetPlayerPos(playerid,614.9377,-1513.0111,15.4176);
return 1;
}
}
if (strcmp("/exit", cmdtext, true, 6) == 0)
{
if(IsPlayerInRangeOfPoint(playerid,10,614.9377,-1513.0111,15.4176))
{
SetPlayerPos(playerid,615.8764,-1512.9479,15.3576);
return 1;
}
Thanks!

