Problem with big variables - 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: Problem with big variables (
/showthread.php?tid=264494)
Problem with big variables -
Ivan_Pantovic - 26.06.2011
I got a problem with this variable (tested with sendclientmessage before and after it).
I know the limit of variable size is 1024 but i really need this big var to load all of the player data from mysql.
new data[140][25];
The text before it shows, but the text after it doesn't.
Код:
SendClientMessage(playerid, COLOR_WHITE, "Please wait till the server loads your data.");
new data[140][10]; //The data strings
SendClientMessage(playerid, COLOR_WHITE, "Loading data...");
mysql_fetch_row(LoadData);
split(LoadData, data, '|');
PlayerInfo[playerid][pCash] = strvalEx(data[3]);
****etc*****
Any ideas how i can fix this?
Thanks.
Re: Problem with big variables -
Ivan_Pantovic - 26.06.2011
Quote:
Originally Posted by ******
Use sscanf, not split. That will entirely negate the need for the ridiculously huge intermediate array.
Also, if you think the limit is 1024, why are you wondering why 140*25=3500 doesn't work?
|
I'm just wondering how to make this work :P
Thanks for your help ill try it.