undefined symbol: playerid ?
#1

Hello, when I compile I get this error:

Quote:

error 017: undefined symbol "playerid"

Code:

PHP код:
GameTextForPlayerplayerid"Welcome"50001); 
Why?
Reply
#2

Show the callback where that code is placed.
Reply
#3

You haven't defined playerid, as you can see, in some callbacks it has a playerid parameter, where others might not.
So you can use it here: OnPlayerConnect(playerid)
But not here: OnGameModeInit()
Reply
#4

It's ok. I was doing on a stock
Reply
#5

Dude, use it under OnPlayerConnect(playerid);

(playerid) is not defined in OnGameModeInit(); It does not have to be due to it being for the gamemode loading up not the player....
Reply
#6

If you use a function, you have to add the playerid parameter yourself.
MyFunc(playerid)
Reply
#7

you can use playerid only under a function or under a callback
if you want to say Welcome to your player when they connect then just do it like this

Код:
public OnPlayerConnect(playerid){
GameTextForPlayer( playerid, "Welcome", 5000, 1); 
return 1;}
Reply
#8

pawn Код:
stock MyStock(playerid)
instead of stock
pawn Код:
stock MyStock()
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)