SA-MP Forums Archive
error 033: array must be indexed - 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 033: array must be indexed (/showthread.php?tid=272494)



error 033: array must be indexed - ylleron - 28.07.2011

Hi i have this problem but i don' know how to fix it.

Код:
new saved_nick[32];
saved_nick = strval(dini_Get(F_MAX_STATS_NAME, "Richest")); // line with problem



Re: error 033: array must be indexed - JaTochNietDan - 28.07.2011

Well that's because you're converting a string to an integer and then storing it in a string. Why are you doing that? What are you trying to get from the file, a string or an integer?


Re: error 033: array must be indexed - ylleron - 28.07.2011

Yes, if i delete it (strval) it say: array sizes do not match, or destination array is too small
And i want to get Name (string)


Re: error 033: array must be indexed - Vince - 28.07.2011

pawn Код:
new saved_nick[32];
strcat(saved_nick, dini_Get(F_MAX_STATS_NAME, "Richest"));



Re: error 033: array must be indexed - ylleron - 28.07.2011

Vince, omg it works thank you so much