open.mp forum
[Pawn] [SOLVED] What is the function, for (increment )? and where did it come from? - Printable Version

+ open.mp forum (https://forum.open.mp)
-- Forum: SA-MP (https://forum.open.mp/forumdisplay.php?fid=3)
--- Forum: Pawn Scripting (https://forum.open.mp/forumdisplay.php?fid=10)
--- Thread: [Pawn] [SOLVED] What is the function, for (increment )? and where did it come from? (/showthread.php?tid=1983)



[SOLVED] What is the function, for (increment )? and where did it come from? - PutuSuhartawan - 2021-05-07

SOLUTION??by?AbyssMorgan :

Code:
Pawn have only for, while and do while loops.

foreach is function maked by developers in foreach.inc standalone y_foreach aka y_iterate or FoxForeach.inc



for example:

Code:

for(new i = 0; i < 10; i)



for(new i = 0; i < 10; i = 2)



for(new i = 0, j = strlen(stringvar); i < j; i)



What is the function, for (increment )? and where did it come from? is that function?from include?



at first I thought the function, "for" was made by foreach include. I was wrong, is this the default function of the pawn language? Can you explain why the language in "for" is different in general? and is it really different for the "for" and "foreach" functions?


RE: Help! What is the function, for (increment )? and where did it come from? - AbyssMorgan - 2021-05-07

Pawn have only for, while and do while loops.

foreach is function maked by developers in foreach.inc standalone y_foreach aka y_iterate or FoxForeach.inc



for example:

Code:
for(new i = 0; i < 10; i)



[color=#333333][size=small][font=Monaco, Consolas, Courier, monospace]for(new i = 0; i < 10; i = 2)[/font][/size][/color]



for(new i = 0, j = strlen(stringvar); i < j; i)