12.09.2013, 06:36
Hello,
I'm trying to store all enter and exit coordinates into an enum so I don't have to IsPlayerInRangeOfPoint all the time for all the coordinates, but the problem is that I'm getting alot of errors, maybe you guys know the problem?
I'm trying to store all enter and exit coordinates into an enum so I don't have to IsPlayerInRangeOfPoint all the time for all the coordinates, but the problem is that I'm getting alot of errors, maybe you guys know the problem?
pawn Код:
enum EnterAndExitEnum
{
Float:EnterPointX,
Float:EnterPointY,
Float:EnterPointZ,
EnterText[128],
Float:EnterCoordPointX,
Float:EnterCoordPointY,
Float:EnterCoordPointZ
}
new EnterAndExit[][EnterAndExitEnum] =
{
{-116.8578, 1132.7495, 19.7375, "Test", 246.8042, 63.3659, 1003.6406}
};
CMD:enter(playerid, params[])
{
new Float:EnterCoordx, Float:EnterCoordy, Float:EnterCoordz;
EnterCoordx = EnterAndExit[EnterPointX];
EnterCoordy = EnterAndExit[EnterPointY];
EnterCoordz = EnterAndExit[EnterPointZ];
if(IsPlayerInRangeOfPoint(playerid, 2.0, EnterCoordx, EnterCoordy, EnterCoordz))
{
SetPlayerPos(playerid, 246.8042, 63.3659, 1003.6406);
SetPlayerInterior(playerid, 6);
}
return 1;
}
Код:
C:\Users\Karim\Desktop\TRRP\gamemodes\TRRP.pwn(2654) : warning 213: tag mismatch C:\Users\Karim\Desktop\TRRP\gamemodes\TRRP.pwn(2654) : error 006: must be assigned to an array C:\Users\Karim\Desktop\TRRP\gamemodes\TRRP.pwn(2655) : warning 213: tag mismatch C:\Users\Karim\Desktop\TRRP\gamemodes\TRRP.pwn(2655) : error 032: array index out of bounds (variable "EnterAndExit") C:\Users\Karim\Desktop\TRRP\gamemodes\TRRP.pwn(2655) : error 006: must be assigned to an array C:\Users\Karim\Desktop\TRRP\gamemodes\TRRP.pwn(2656) : warning 213: tag mismatch C:\Users\Karim\Desktop\TRRP\gamemodes\TRRP.pwn(2656) : error 032: array index out of bounds (variable "EnterAndExit") C:\Users\Karim\Desktop\TRRP\gamemodes\TRRP.pwn(2656) : error 006: must be assigned to an array Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase