PDA

View Full Version : A printf stopping a loop from displaying results?


Dokins
26/01/2015, 10:54 PM
for(new w = 0; w < 13; w++)
{
new string[12];
format(string, sizeof(string), "Weapon%d", w);
mysql_get_field(string, QueryString);
PlayerWeapons[playerid][w] = strval(QueryString);
printf("Slot: %d, Weapon SQLID: %d, WeaponINDEX: %d",w , PlayerWeapons[playerid][w],GetWepIndexFromSQL(PlayerWeapons[playerid][w]));
}


The Printf's print, but no data is in the result. And therefore I don't get any weapons. When I remove the Printf it works perfectly. Putting it outside the loop doesn't work.

Dokins
27/01/2015, 12:37 PM
Bump.

BroZeus
27/01/2015, 01:33 PM
hmm this functions seems to have problem - GetWepIndexFromSQL(PlayerWeapons[playerid][w])
Show the stock for this function.