Need a hand once more - 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: Need a hand once more (
/showthread.php?tid=352529)
Need a hand once more -
kujox222 - 20.06.2012
Код:
error 017: undefined symbol "Name"
pawn Код:
stock GetName(playerid)
{
new string[24];
format(string, 24, "%s", pInfo[playerid][Name]);
return string;
}
I have tried new Name[MAX_PLAYER_NAME];
new Name[24];
Nothing it just gives me this random error -
Код:
error 033: array must be indexed (variable "Name")
Name[MAX_PLAYER_NAME];
new Name[24];
Re: Need a hand once more -
[MM]RoXoR[FS] - 20.06.2012
pawn Код:
stock GetName(playerid)
{
return pInfo[playerid][Name];
}
pawn Код:
new Name[MAX_PLAYER_NAME];
Can you describe your problem a little bit more?
Re: Need a hand once more -
kujox222 - 20.06.2012
Quote:
Originally Posted by [MM]RoXoR[FS]
pawn Код:
stock GetName(playerid) { return pInfo[playerid][Name]; }
pawn Код:
new Name[MAX_PLAYER_NAME];
Can you describe your problem a little bit more?
|
Its self explanatory at this point.
Re: Need a hand once more -
Skaizo - 20.06.2012
pawn Код:
stock GetName(playerid)
{
new Name[MAX_PLAYER_NAME];
GetPlayerName(playerid, Name, sizeof(Name));
return Name;
}
Re: Need a hand once more -
kujox222 - 20.06.2012
Quote:
Originally Posted by Skaizo
pawn Код:
stock GetName(playerid) { new Name[MAX_PLAYER_NAME]; GetPlayerName(playerid, Name, sizeof(Name)); return Name; }
|
That worked thanks again Skaizo lol.