[Help]Array index out of bounds Problem
#2

pawn Code:
format(ServerInfo[NewestPlayer],32,"%s",GetName(playerid));
What... is GetName?
See, in C/++/PAWN you cannot directly return strings from functions, you should use pointers on arrays.
Use this instead:
pawn Code:
new NAME[24];
GetPlayerName(playerid, NAME, sizeof NAME);
format(ServerInfo[NewestPlayer],32,"%s",NAME);
Hope I helped ^^
Reply


Messages In This Thread
[Help]Array index out of bounds Problem - by Mamal75 - 13.10.2014, 08:17
Re: [Help]Array index out of bounds Problem - by AnnaSB - 13.10.2014, 09:01
Re: [Help]Array index out of bounds Problem - by Mamal75 - 13.10.2014, 09:05
Re: [Help]Array index out of bounds Problem - by Mamal75 - 13.10.2014, 09:15
Re: [Help]Array index out of bounds Problem - by Mamal75 - 13.10.2014, 10:16
Re: [Help]Array index out of bounds Problem - by Mamal75 - 13.10.2014, 10:58
Re: [Help]Array index out of bounds Problem - by Mamal75 - 13.10.2014, 12:27
Re: [Help]Array index out of bounds Problem - by Mamal75 - 13.10.2014, 14:18
Re: [Help]Array index out of bounds Problem - by AnnaSB - 13.10.2014, 19:46
Re: [Help]Array index out of bounds Problem - by Rudy_ - 14.10.2014, 11:10

Forum Jump:


Users browsing this thread: 1 Guest(s)