/nrg and /inf error pls help
#1

Hi, i was trying to make a command, but i get some errors:

D:\Samp Roleplay Server Beta Testing\gamemodes\CP.pwn(1) : error 017: undefined symbol "MAX_PLAYERS"
D:\Samp Roleplay Server Beta Testing\gamemodes\CP.pwn(1) : error 009: invalid array size (negative, zero or out of bounds)
D:\Samp Roleplay Server Beta Testing\gamemodes\CP.pwn(2) : error 017: undefined symbol "MAX_PLAYERS"
D:\Samp Roleplay Server Beta Testing\gamemodes\CP.pwn(2) : error 009: invalid array size (negative, zero or out of bounds)
D:\Samp Roleplay Server Beta Testing\gamemodes\CP.pwn(4) : error 017: undefined symbol "MAX_PLAYERS"
D:\Samp Roleplay Server Beta Testing\gamemodes\CP.pwn(95) : warning 217: loose indentation
D:\Samp Roleplay Server Beta Testing\gamemodes\CP.pwn(9 : warning 217: loose indentation
D:\Samp Roleplay Server Beta Testing\gamemodes\CP.pwn(99) : warning 217: loose indentation
D:\Samp Roleplay Server Beta Testing\gamemodes\CP.pwn(105) : warning 217: loose indentation
D:\Samp Roleplay Server Beta Testing\gamemodes\CP.pwn(107) : warning 217: loose indentation
D:\Samp Roleplay Server Beta Testing\gamemodes\CP.pwn(10 : warning 217: loose indentation
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


5 Errors.

This is the code:

new inf[MAX_PLAYERS];
new nrg[MAX_PLAYERS];

new Float:Pos[MAX_PLAYERS][4];

public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext,"/inf",true))
{
DestroyVehicle(inf[playerid]);
GetPlayerPos(playerid,Pos[playerid][1],Pos[playerid][2],Pos[playerid][3]);
inf[playerid]=CreateVehicle(411,Pos[playerid][1],Pos[playerid][2],Pos[playerid][3],0,-1,-1,10);
PutPlayerInVehicle(playerid,inf[playerid], 0);
SendClientMessage(playerid,0xFF641AFF,"SERVER: You have Spawned An Infernus.");
return 1;
}
if(!strcmp(cmdtext,"/nrg",true))
{
DestroyVehicle(nrg[playerid]);
GetPlayerPos(playerid,Pos[playerid][1],Pos[playerid][2],Pos[playerid][3]);
nrg[playerid]=CreateVehicle(522,Pos[playerid][1],Pos[playerid][2],Pos[playerid][3],0,-1,-1,10);
PutPlayerInVehicle(playerid,nrg[playerid], 0);
SendClientMessage(playerid,0xFF641AFF,"SERVER: You have Spawned An NRG-500.");
return 1;
}
return 0;
}
Reply
#2

Код:
#include <a_samp>
Your indentation is non-existent...

https://sampforum.blast.hk/showthread.php?tid=256961
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)