OnGameModeInit Error?
#1

I compiled my script and I got this:

Код:
error 025: function heading differs from prototype
and thats from this line:

Код:
public OnGameModeInit(playerid)
Help please? I got that because I had to put playerid between the brackets cause i put RemoveBuildingForPlayer
Reply
#2

"playerid" does not exist in OnGameModeInit. You can't reference a playerid because when OnGameModeInit executes, no players have connected. Instead, you can copy your 'RemoveBuildingForPlayer' code in to OnPlayerConnect.

Simply change the public line to:
pawn Код:
public OnGameModeInit()
Reply
#3

there must be no playerid parameter in OnGameModeInit.

So it should be

pawn Код:
public OnGameModeInit( )
hope this helps

EDIT: lol Calgon you are faster

-FalconX
Reply
#4

Quote:
Originally Posted by Calgon
Посмотреть сообщение
"playerid" does not exist in OnGameModeInit. You can't reference a playerid because when OnGameModeInit executes, no players have connected. Instead, you can copy your 'RemoveBuildingForPlayer' code in to OnPlayerConnect.

Simply change the public line to:
pawn Код:
public OnGameModeInit()
Quote:
Originally Posted by FalconX
Посмотреть сообщение
there must be no playerid parameter in OnGameModeInit.

So it should be

pawn Код:
public OnGameModeInit( )
hope this helps

EDIT: lol Calgon you are faster

-FalconX
Thanks guys! I appreaciate the help!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)