how to split 2 times - 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: how to split 2 times (
/showthread.php?tid=255700)
how to split 2 times -
lolumadd_ - 16.05.2011
I am saving many variables in one mysql field. This is how I save it, but how can I load it back?
Код:
new string[16], string2[16], save[64];
for(new i=0; i < MAX_BIZZ; i++)
{
format(string, 16, "stock_%d", i);
if(GetPVarInt(playerid, string) != 0)
{
format(string2, 16, "shares_%d", i);
format(string, 16 "%d,%d|", i, GetPVarInt(playerid, string2));
format(save, 64, "%s%s", save, string);
}
}
//insert "save" into the users row
So when I load it when he logs back in, how can I:
1. Split it by the '|' first
2. Split it by the ',' second
3. Then I will have all of my values back
Or any other way that could work please tell
Thanks
Re: how to split 2 times -
lolumadd_ - 16.05.2011
fixed