Map error
#1

I tried to put this map in my server, I created a object filterscript [https://sampforum.blast.hk/showthread.php?tid=602989]

And I got this error:
C:\Users\User\Desktop\Server\filterscripts\Object. pwn(861) : warning 217: loose indentation
C:\Users\User\Desktop\Server\filterscripts\Object. pwn(861) : error 017: undefined symbol "playerid"
C:\Users\User\Desktop\Server\filterscripts\Object. pwn(862) : error 017: undefined symbol "playerid"
C:\Users\User\Desktop\Server\filterscripts\Object. pwn(863) : error 017: undefined symbol "playerid"
C:\Users\User\Desktop\Server\filterscripts\Object. pwn(864) : error 017: undefined symbol "playerid"
C:\Users\User\Desktop\Server\filterscripts\Object. pwn(865) : error 017: undefined symbol "playerid"
C:\Users\User\Desktop\Server\filterscripts\Object. pwn(866) : error 017: undefined symbol "playerid"
C:\Users\User\Desktop\Server\filterscripts\Object. pwn(867) : error 017: undefined symbol "playerid"
C:\Users\User\Desktop\Server\filterscripts\Object. pwn(86 : error 017: undefined symbol "playerid"
C:\Users\User\Desktop\Server\filterscripts\Object. pwn(869) : error 017: undefined symbol "playerid"
C:\Users\User\Desktop\Server\filterscripts\Object. pwn(870) : error 017: undefined symbol "playerid"
C:\Users\User\Desktop\Server\filterscripts\Object. pwn(871) : error 017: undefined symbol "playerid"
C:\Users\User\Desktop\Server\filterscripts\Object. pwn(872) : error 017: undefined symbol "playerid"
C:\Users\User\Desktop\Server\filterscripts\Object. pwn(873) : error 017: undefined symbol "playerid"
C:\Users\User\Desktop\Server\filterscripts\Object. pwn(874) : error 017: undefined symbol "playerid"
C:\Users\User\Desktop\Server\filterscripts\Object. pwn(875) : error 017: undefined symbol "playerid"
C:\Users\User\Desktop\Server\filterscripts\Object. pwn(876) : error 017: undefined symbol "playerid"
C:\Users\User\Desktop\Server\filterscripts\Object. pwn(877) : error 017: undefined symbol "playerid"
C:\Users\User\Desktop\Server\filterscripts\Object. pwn(87 : error 017: undefined symbol "playerid"
C:\Users\User\Desktop\Server\filterscripts\Object. pwn(879) : error 017: undefined symbol "playerid"
C:\Users\User\Desktop\Server\filterscripts\Object. pwn(880) : error 017: undefined symbol "playerid"
C:\Users\User\Desktop\Server\filterscripts\Object. pwn(881) : error 017: undefined symbol "playerid"
C:\Users\User\Desktop\Server\filterscripts\Object. pwn(882) : error 017: undefined symbol "playerid"
C:\Users\User\Desktop\Server\filterscripts\Object. pwn(883) : error 017: undefined symbol "playerid"
C:\Users\User\Desktop\Server\filterscripts\Object. pwn(884) : error 017: undefined symbol "playerid"
C:\Users\User\Desktop\Server\filterscripts\Object. pwn(885) : error 017: undefined symbol "playerid"
C:\Users\User\Desktop\Server\filterscripts\Object. pwn(886) : error 017: undefined symbol "playerid"

It's what I created - http://pastebin.com/QGUyxYMh
Reply
#2

RemoveBuildingForPlayer explicitly tells you that it is meant for a player: https://sampwiki.blast.hk/wiki/RemoveBuildingForPlayer

It should either be under OnPlayerConnect or in a for-loop. I recommend to put it under OnPlayerConnect unless you're trying to do something else.
Reply
#3

Quote:
Originally Posted by AndySedeyn
Посмотреть сообщение
RemoveBuildingForPlayer explicitly tells you that it is meant for a player: https://sampwiki.blast.hk/wiki/RemoveBuildingForPlayer

It should either be under OnPlayerConnect or in a for-loop. I recommend to put it under OnPlayerConnect unless you're trying to do something else.
Can you please send me a pawn script of this map, please?
Reply
#4

Put all your RemoveBuildingForPlayer codes under OnPlayerConnect.
Reply
#5

Fixed, thanks guys!!
Reply
#6

Quote:
Originally Posted by AndySedeyn
Посмотреть сообщение
RemoveBuildingForPlayer explicitly tells you that it is meant for a player: https://sampwiki.blast.hk/wiki/RemoveBuildingForPlayer

It should either be under OnPlayerConnect or in a for-loop. I recommend to put it under OnPlayerConnect unless you're trying to do something else.
No in a for-loop because RemoveBuildingForPlayer() function remove the building selected WHEN the player connect to the server. So if you put a for-loop in OnGamemodeInit the Building return an INVALID PLAYER ID and function don't work.
Reply
#7

Quote:
Originally Posted by YouServ
Посмотреть сообщение
No in a for-loop because RemoveBuildingForPlayer() function remove the building selected WHEN the player connect to the server. So if you put a for-loop in OnGamemodeInit the Building return an INVALID PLAYER ID and function don't work.
I know that's the case for gamemodes but putting a loop under OnFilterScriptInit has its use. And since you brought it up, allow me to explain myself. Filterscripts don't have to be loaded in when the server starts. You can go in-game and load any existing filterscript at any given moment. In such a case, OnFilterScriptInit is still called and thus looping through all players is correct. Of course, if you are planning on calling the filterscript only when the server starts, then this is redundant and that's what I meant with:
Quote:
Originally Posted by AndySedeyn
I recommend to put it under OnPlayerConnect unless you're trying to do something else
The OP clearly stated that it was a filterscript with which he was working and not a gamemode.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)