error 017: undefined symbol "GetPlayerId" !!!??? What the ... - 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: error 017: undefined symbol "GetPlayerId" !!!??? What the ... (
/showthread.php?tid=86481)
error 017: undefined symbol "GetPlayerId" !!!??? What the ... -
boelie - 14.07.2009
Hello readers,
Most of the time GetPlayerId would work..but then suddenly when i dont expect it this will happen;
Код:
C:\Users\Benutzer\Desktop\D-Fs.pwn(133) : warning 217: loose indentation
C:\Users\Benutzer\Desktop\D-Fs.pwn(138) : warning 217: loose indentation
C:\Users\Benutzer\Desktop\D-Fs.pwn(145) : error 017: undefined symbol "GetPlayerId"
C:\Users\Benutzer\Desktop\D-Fs.pwn(152) : warning 217: loose indentation
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
i got this;
Код:
if(strcmp(cmd, "/Taxi", true) == 0)
{
new tmp[128];
tmp = strtok(cmdtext, idx);
new currentplayer1;
new sendername[MAX_PLAYER_NAME];
GetPlayerName(playerid,sendername, sizeof(sendername));
currentplayer1 = GetPlayerId(sendername);
if(strlen(tmp) == 0) return SendClientMessage(playerid, 0xFFFFFFFF, "USAGE: /Taxi [playerid]");
SetPlayerMarkerForPlayer(currentplayer1,strval(tmp),0xFF0000FF );
TogglePlayerControllable(strval(tmp),0);
}
You know why this happen ? please post here thanks
Re: error 017: undefined symbol "GetPlayerId" !!!??? What the ... -
yezizhu - 14.07.2009
GetPlayerId ,
GetPlayerid,
GetPlayerID,
getplayerid,
getplayerID,
getPlayerID,
or getPlayerid?
Re: error 017: undefined symbol "GetPlayerId" !!!??? What the ... -
boelie - 14.07.2009
Quote:
GetPlayerId ,
GetPlayerid,
GetPlayerID,
getplayerid,
getplayerID,
getPlayerID,
or getPlayerid?
|
doesnt work i tried all
Re: error 017: undefined symbol "GetPlayerId" !!!??? What the ... -
DiDok - 14.07.2009
There's no such thing as GetPlayerID... It's some custom function and you must define it/include it/use it properly
Re: error 017: undefined symbol "GetPlayerId" !!!??? What the ... -
watkijkje - 14.07.2009
Add this to your GM/FS
pawn Код:
stock GetPlayerID(const Name[])
{
for(new i; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
new pName[MAX_PLAYER_NAME];
GetPlayerName(i, pName, sizeof(pName));
if(strcmp(Name, pName, true)==0)
{
return i;
}
}
}
return -1;
}
Re: error 017: undefined symbol "GetPlayerId" !!!??? What the ... -
Yuryfury - 14.07.2009
Quote:
Originally Posted by DiDok
There's no such thing as GetPlayerID...
|
Yeah that is what I was thinking. Unless you use a for i loop like the script above
Re: error 017: undefined symbol "GetPlayerId" !!!??? What the ... -
Yuryfury - 14.07.2009
Sorry for DP but isn't sendername the same as playerid in this case
pawn Код:
GetPlayerName(playerid,sendername, sizeof(sendername));
currentplayer1 = GetPlayerId(sendername)
You get the name of Playerid then get the ID of the name...
Re: error 017: undefined symbol "GetPlayerId" !!!??? What the ... -
DeathOnaStick - 14.07.2009
Yes because he needs the ID to complete the command, theres no other way in my opinion!
Re: error 017: undefined symbol "GetPlayerId" !!!??? What the ... -
Yuryfury - 14.07.2009
Quote:
Originally Posted by DeathOnaStick
Yes because he needs the ID to complete the command, theres no other way in my opinion!
|
he already has the ID, playerid
he renames playerid to sendername
Re: error 017: undefined symbol "GetPlayerId" !!!??? What the ... -
DeathOnaStick - 14.07.2009
:S... makes sence... XD