07.12.2009, 08:35
Hi ok i am writing a code in which i will set a checkpoint in ls railway station and when an npc in a train enters the checkpoint,it will give gametextforall that the train has arrived in ls railway station.But it gives me some error and warnings.
C:\Users\Dhananjay\Desktop\SA MP Windows Server\filterscripts\gl_npcs.pwn(30) : error 017: undefined symbol "playerid"
C:\Users\Dhananjay\Desktop\SA MP Windows Server\filterscripts\gl_npcs.pwn(90) : warning 217: loose indentation
C:\Users\Dhananjay\Desktop\SA MP Windows Server\filterscripts\gl_npcs.pwn(95) : warning 217: loose indentation
Help?
C:\Users\Dhananjay\Desktop\SA MP Windows Server\filterscripts\gl_npcs.pwn(30) : error 017: undefined symbol "playerid"
C:\Users\Dhananjay\Desktop\SA MP Windows Server\filterscripts\gl_npcs.pwn(90) : warning 217: loose indentation
C:\Users\Dhananjay\Desktop\SA MP Windows Server\filterscripts\gl_npcs.pwn(95) : warning 217: loose indentation
Код:
new CheckpointtrainLS[MAX_PLAYERS]; public OnPlayerEnterCheckpoint(playerid) { if(IsPlayerNPC(playerid)) { if(CheckpointtrainLS[playerid] == 1) { GameTextForAll("A train has arrived at Los Santos Railway Station.", 7500, 5); } return 1; } else if(!IsPlayerNPC(playerid)) { GameTextForPlayer(playerid,"This Checkpoint is used for trains!", 7500, 5); return 0; } return 1; }