SA-MP Forums Archive
A printf stopping a loop from displaying results? - 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)
+--- Thread: A printf stopping a loop from displaying results? (/showthread.php?tid=560112)



A printf stopping a loop from displaying results? - Dokins - 26.01.2015

pawn Код:
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.


Re: A printf stopping a loop from displaying results? - Dokins - 27.01.2015

Bump.


Re: A printf stopping a loop from displaying results? - BroZeus - 27.01.2015

hmm this functions seems to have problem - GetWepIndexFromSQL(PlayerWeapons[playerid][w])
Show the stock for this function.