onplayerconnect error!
#1

public OnPlayerConnect(playerid)
{
PlayerCar[playerid] = -1;
return 1;
}


i get this:

PHP код:
D:\Documents and Settings\abc\Desktop\Serveris\Conex SA-MP\filterscripts\poke.pwn(56) : error 017undefined symbol "PlayerCar"
D:\Documents and Settings\abc\Desktop\Serveris\Conex SA-MP\filterscripts\poke.pwn(56) : warning 215expression has no effect
D
:\Documents and Settings\abc\Desktop\Serveris\Conex SA-MP\filterscripts\poke.pwn(56) : error 001expected token";"but found "]"
D:\Documents and Settings\abc\Desktop\Serveris\Conex SA-MP\filterscripts\poke.pwn(56) : error 029invalid expressionassumed zero
D
:\Documents and Settings\abc\Desktop\Serveris\Conex SA-MP\filterscripts\poke.pwn(56) : fatal error 107too many error messages on one line
Compilation aborted
.Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
4 Errors

could somebody fix this? thanks
Reply
#2

Define
pawn Код:
new PlayerCar[MAX_PLAYERS];
somewhere at the top of your gamemode.
Do NOT put this inside a public.
Reply
#3

it's already defined.
Reply
#4

Show me where you defined it.
Reply
#5

at the start of the script.

PHP код:
#include <a_samp>

#if defined FILTERSCRIPT
#define Red            5877
#define Blue        5878
#define Green        5879
#define Yellow        5880
#define Cyan        5881
#define Pink        5882
#define White        5883
#define Black        5884
#define Driver 0
#define Passanger 2
new PlayerCar[MAX_PLAYERS];
LockedCar[1000];
new 
Text:Locked;
new 
MsgLocked[MAX_PLAYERS], LockedTimer[MAX_PLAYERS];
forward RemoveLock(playerid); 
Reply
#6

Do it PlayerCar[playerid] = 1; or PlayerCar[playerid] = 0;
Reply
#7

same errors.
Reply
#8

Quote:

public OnPlayerConnect(playerid)
{
PlayerCar[playerid] = 0;
return 1;
}

Try this one mate

If this isn't working just pm me on forum. (In Latvian Language I will help you out )
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)