gate problem
#1

Hi, I can not script but getting to, and I started making gates, I help a program make, I have completed everything and he gives me this pawn code:

Код:
#include <a_samp>

new SRIN;

public OnFilterScriptInit()
{
SRIN = CreateObject(980, 836.255137, -2069.987067, 17.859631, 0.000, 0.000, 0.000);
return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/sr1o", cmdtext, true, 10) == 0)
{
if(PlayerInfo[playerid][SRMember] == 1 || PlayerInfo[playerid][pLeader] == 1)
{
if(IsPlayerInRangeOfPoint(playerid, 0, 836.255137, -2069.987067, 17.859631))
{
MoveObject(SRIN, 836.255127, -2069.987067, 17.859631, 3.0);
SendClientMessage(playerid, 0xFFFFFF, "SR BASE ZEGT: De ingang is nu open");
}
}else{
SendClientMessage(playerid, 0xFFFFF, "SR BASE ZEGT: join SR voor de base binnen te mogen!");
}
return 1;
}
if (strcmp("/sr1c", cmdtext, true, 10) == 0)
{
if(PlayerInfo[playerid][SRMember] == 1 || PlayerInfo[playerid][pLeader] == 1)
{
if(IsPlayerInRangeOfPoint(playerid, 0, 836.255137, -2069.987067, 17.859631))
{
MoveObject(SRIN, 836.255137, -2069.987067, 17.859631, 3.0);
SendClientMessage(playerid, 0xFFFFFF, "SR BASE ZEGT: De ingang is nu gesloten");
}
}else{
SendClientMessage(playerid, 0xFFFFF, "SR BASE ZEGT: join SR voor de base binnen te mogen!");
}
return 1;
}
return 0;
}
but when I compile it gives it 4 errors to:

Код:
C:\Documents and Settings\Laurens Vos\Mijn documenten\dingen van laurens\Games\GTA\script\pawno\voorbeelden\SR ingang gate.pwn(15) : error 017: undefined symbol "PlayerInfo"
C:\Documents and Settings\Laurens Vos\Mijn documenten\dingen van laurens\Games\GTA\script\pawno\voorbeelden\SR ingang gate.pwn(15) : warning 215: expression has no effect
C:\Documents and Settings\Laurens Vos\Mijn documenten\dingen van laurens\Games\GTA\script\pawno\voorbeelden\SR ingang gate.pwn(15) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\Laurens Vos\Mijn documenten\dingen van laurens\Games\GTA\script\pawno\voorbeelden\SR ingang gate.pwn(15) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Laurens Vos\Mijn documenten\dingen van laurens\Games\GTA\script\pawno\voorbeelden\SR ingang gate.pwn(15) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.

what is wrong with this script?
Reply
#2

There is no array "PlayerInfo" created in your script.
Reply
#3

no? its in the script
Reply
#4

Not in the script you posted above, and the errors support it.
Reply


Forum Jump:


Users browsing this thread: