SA-MP Forums Archive
Error array - 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: Error array (/showthread.php?tid=521538)



Error array - ridhoswasta - 23.06.2014

F:\CNR - RP\gamemodes\arcnr2p.pwn(12037) : error 033: array must be indexed (variable "-unknown-")
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.

line : new o = GetName(playerid);


Re: Error array - Barnwell - 23.06.2014

CTRL+F find -unknown-


Re: Error array - Konstantinos - 23.06.2014

It's supposed you use GetName to return the player's name directly and not using GetPlayerName and storing the name. Why are you trying to store to an integer the name? Either use "GetName(playerid)" or "o":
pawn Код:
new o[MAX_PLAYER_NAME];
GetPlayerName(playerid, o, MAX_PLAYER_NAME);