SA-MP Forums Archive
Sscanf 2.0 Array shortcut? - 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: Sscanf 2.0 Array shortcut? (/showthread.php?tid=196704)



Sscanf 2.0 Array shortcut? - randomkid88 - 06.12.2010

I am trying to use sscanf to load houses/bizzes/etc which requres them be loaded into a 3D array. I know you can load into a 3d array this way:
pawn Код:
foreach(Player, i)
{
     sscanf("1,2,3,4,5", "p<,>iiiii", Array[i][a], Array[i][b]...); //Continue out to Array[i][e]
}
That is fine in this instance but when you have this:
pawn Код:
for(new h; h<MAX_HOUSES; h++)
{
    fread(file, filestr);
    sscanf(filestr, "p<,>is[24]s[24]iiiiiffffffiiii", Houses[h][a], Houses[h][b], ...); // Out to R
}
It is a little bit more complicated. Is there a way to use "a<>" and incorporate 3D arrays?