SA-MP Forums Archive
GetName(killerid); Help - 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)
+--- Thread: GetName(killerid); Help (/showthread.php?tid=498764)



GetName(killerid); Help - ChandraLouis - 05.03.2014

format(gString,SOS,"[KS-System]: Player %s is on 35 Killing Spree!",GetName(killerid));

Error : undefined symbol "GetName"


Re: GetName(killerid); Help - rangerxxll - 05.03.2014

You'll need to create a stock for "GetName".

pawn Код:
stock GetName(playerid)
{
    new tname[MAX_PLAYER_NAME];
    GetPlayerName(playerid,tname,sizeof(tname));
    return tname;
}



Re: GetName(killerid); Help - ChandraLouis - 05.03.2014

one more error : expected token: ";", but found "new"
pawn Код:
new Float:USpawns[][] =
{
    {2037.3101,-1411.9154,17.1641,130.8957},
    {2023.6194,-1403.0396,17.1943,215.4965},
    {2041.8749,-1429.7291,17.1641,34.4443}
};



Re: GetName(killerid); Help - Avi Raj - 05.03.2014

The error isn't in this code.
Its in the upper part, please show us the upper part of script.


Re: GetName(killerid); Help - rangerxxll - 05.03.2014

What's the variable before this? Show me the exact line it's on, and the one before it.


Re: GetName(killerid); Help - ChandraLouis - 05.03.2014

Sure
pawn Код:
new Float:CSpawns[][] =
{
    {1544.2753,-1631.8912,13.3828,89.8464},
    {1579.8024,-1635.8939,13.5600,81.3864},
    {1560.0697,-1636.4077,13.5579,359.6853}
};

new Float:ESpawns[][] =
{
    {1255.9995,-1438.9191,18.7572,77.6677},
    {1233.1072,-1418.8169,13.3867,159.1680},
    {1212.7148,-1428.1558,13.3828,355.5339}
};

new Float:ISpawns[][] =
{
    {1261.0070,-778.9564,95.9631,271.8892},
    {1291.2427,-789.9381,92.0313,93.4559},
    {1254.3867,-791.0951,92.0313,270.6358}
}



Re: GetName(killerid); Help - rangerxxll - 05.03.2014

The last array is missing a ;.

pawn Код:
new Float:ISpawns[][] =
{
    {1261.0070,-778.9564,95.9631,271.8892},
    {1291.2427,-789.9381,92.0313,93.4559},
    {1254.3867,-791.0951,92.0313,270.6358}
};



Re: GetName(killerid); Help - Dignity - 05.03.2014

pawn Код:
new Float:ISpawns[][] =
{
    {1261.0070,-778.9564,95.9631,271.8892},
    {1291.2427,-789.9381,92.0313,93.4559},
    {1254.3867,-791.0951,92.0313,270.6358}
}
You forgot a ; after the }.

pawn Код:
new Float:ISpawns[][] =
{
    {1261.0070,-778.9564,95.9631,271.8892},
    {1291.2427,-789.9381,92.0313,93.4559},
    {1254.3867,-791.0951,92.0313,270.6358}
};



Re: GetName(killerid); Help - ChandraLouis - 05.03.2014

Sank you