how to split 2 times
#1

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
Reply
#2

fixed
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)