multiple variables to a string
#1

I'm wanting to fetch 'charges' from my sql table, and to attach many of them in one string, for example

Let's say these are the charges

CHAR_NAME, Hit and run, other variables
CHAR_NAME, Murder, other variables

And attach them to a string so if I printed the string it would return

'Hit and Run, Murder'

I've tried this so far:

for(new z = 0; z < cache_get_row_count(); z++)
{
cache_get_field_content(0, "Reason", list);
//format(list, sizeof(list), "%s", list);
strcat(charges, list);
}
SetPVarString(playerid, "mdcreturn", charges);

But it currently only returns:

'Hit and run, Hit and run' and not 'Hit and Run, Murder' as it should

Any help would be amazing
Reply


Messages In This Thread
multiple variables to a string - by izeatfishz - 27.01.2016, 18:34
Re: multiple variables to a string - by Virtual1ty - 27.01.2016, 19:31
Re: multiple variables to a string - by izeatfishz - 27.01.2016, 19:35
Re: multiple variables to a string - by Virtual1ty - 27.01.2016, 19:44
Re: multiple variables to a string - by izeatfishz - 27.01.2016, 20:07
Re: multiple variables to a string - by AmigaBlizzard - 27.01.2016, 20:54
Re: multiple variables to a string - by izeatfishz - 28.01.2016, 21:29
Re: multiple variables to a string - by izeatfishz - 08.02.2016, 18:37
Re: multiple variables to a string - by Jefff - 08.02.2016, 20:53
Re: multiple variables to a string - by Vince - 08.02.2016, 21:41

Forum Jump:


Users browsing this thread: 1 Guest(s)