SA-MP Forums Archive
[DM] undefined symbol - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [DM] undefined symbol (/showthread.php?tid=94863)



[DM] undefined symbol - Dawior - 01.09.2009

welcome to this 2 errory when compiling:

Код:
D:\BloodZnCripZ\gamemodes\BloodZnCripZ.pwn(71) : error 029: invalid expression, assumed zero
D:\BloodZnCripZ\gamemodes\BloodZnCripZ.pwn(71) : error 017: undefined symbol "SetPlayerClass"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


2 Errors.
here gives the line:
Код:
stock SetPlayerClass(playerid, classid)
{
switch(classid)
{
case 102, 103, 104: gTeam[playerid] = TEAM_bloodz;
case 105, 106, 107, 271, 270,269: gTeam[playerid] = TEAM_cripz;
}
}
Please help thanks in advance


Re: [DM] undefined symbol - LuxurioN™ - 01.09.2009

Not use:

Код:
stock
for

Код:
SetPlayerClass(playerid, classid)
Try:

pawn Код:
SetPlayerClass(playerid, classid)
{
switch(classid)
{
case 102, 103, 104: gTeam[playerid] = TEAM_bloodz;
case 105, 106, 107, 271, 270,269: gTeam[playerid] = TEAM_cripz;
}
}



Re: [DM] undefined symbol - Dawior - 01.09.2009

I gave just as you wrote, and this error:

Код:
D:\BloodZnCripZ\gamemodes\BloodZnCripZ.pwn(370) : error 017: undefined symbol "SetPlayerClass"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.



Re: [DM] undefined symbol - LuxurioN™ - 01.09.2009

you use OnPlayerRequestClass(playerid, classid)?


Re: [DM] undefined symbol - Dawior - 01.09.2009

yes


Re: [DM] undefined symbol - Dawior - 01.09.2009

refresh


Re: [DM] undefined symbol - Karlip - 01.09.2009

Does SetPlayerClass even exist?

oh,

change it to
pawn Код:
public SetPlayerClass(playerid, classid)
{



Re: [DM] undefined symbol - dice7 - 01.09.2009

He is obviously using it as a function inside OnPlayerRequestSpawn *facepalm*


Re: [DM] undefined symbol - Dawior - 02.09.2009

Quote:
Originally Posted by ! Karlip
Does SetPlayerClass even exist?

oh,

change it to
pawn Код:
public SetPlayerClass(playerid, classid)
{
There currently is 1 Warring
Код:
D:\BloodZnCripZ\gamemodes\BloodZnCripZ.pwn(476) : warning 235: public function lacks forward declaration (symbol "SetPlayerClass")
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Warning.



Re: [DM] undefined symbol - Correlli - 02.09.2009

Forward it.
Example:
pawn Код:
forward SetPlayerClass(playerid, classid);