foreach 19 standalone include -
Kar - 14.04.2015
https://github.com/karimcambridge/SAMP-foreach/releases
I told ****** that I would maintain this old standalone version and he was OK with it.
Major changes in 19:
0.4.3
Code:
Iterators are now default set to ITER_NONE (-1), because in this version, an iterator can only hold 0 - size.
Added Iter_Finish and Iter_Previous marcos.
Remove \n at the end of the file.
Removed Iter_Debug & Iter_ShowArray (unused / disabled).
Remove space on function declarations.
foreach: clear each iterator under OnFilterScriptInit/OnGameModeInit.
Added a revised Iter_SafeRemoveInternal (ZiGGi).
Fix tags (ZiGGi).
Fix some grammar issue with spaces.
0.4.2
Code:
Code cleanup (renamed all Itter_ to Iter and removed excess).
Removed unnecessary information.
As I don't like how the newer foreach versions require YSI, this is the only one that I use.
This foreach 19 now replicas y_iterate at version 19.
Re: foreach 0.4.1 standalone include -
RaeF - 14.04.2015
y_commands for standalone version pls, that would be nice haha
Re: foreach 0.4.1 standalone include -
lukewid - 14.04.2015
great!
I was starting to think no one was actually going to re-release some kind of edit of ******'s work.
Re: foreach 0.4.1 standalone include -
Crayder - 14.04.2015
Quote:
Originally Posted by lukewid
great!
I was starting to think no one was actually going to re-release some kind of edit of ******'s work.
|
Trust me you're wrong. You're gonna see YSI somewhere soon.
Plus, Kar, you didn't need his permission. Look at the license.
Re: foreach 0.4.1 standalone include -
Gammix - 14.04.2015
I don't see why you are releasing a standalone version of foreach?
YSI don't even use memory hacking and as well y_iterate. So you can still continue using it with SAMP client updates.
Quote:
Code cleanup (remove all Itter_)
|
Itter_ functions are most important and useful part of foreach though!
@RaeF: whats wrong using y_commands include from YSI itself?
Re: foreach 0.4.1 standalone include -
Kar - 14.04.2015
The latest foreach required YSI.
Itter is spelt in correctly, they are now named Iter.
Re: foreach 0.4.1 standalone include -
Crayder - 14.04.2015
Quote:
Originally Posted by Kar
The latest foreach required YSI.
Itter is spelt in correctly, they are now named Iter.
|
Actually foreach has always been YSI. Foreach was like a chalkboard compared to it's upgrade - the whiteboard, y_iterate.
And @Gammix: LOL. Itter was just a misspelling that has been fixed for a few months.
Re: foreach 0.4.1 standalone include -
Kar - 14.04.2015
Quote:
Originally Posted by Crayder
Actually foreach has always been YSI. Foreach was like a chalkboard compared to it's upgrade - the whiteboard, y_iterate.
|
Okay.
foreach has a version which does NOT require YSI. Which is THIS version.
The foreach 0.3 compatible thread was the STANDALONE version.
There was always 2 versions of foreach, a y_iterate version and foreach.inc.
You guys are probably too new here to realize it.
Why are you guys complaining.. I have done nothing wrong....
21/08/09:
Updated to include random functions.
Made entirely stand alone.
Ported to 0.3 (separate version).
Added automatic callback hook code.
Removed debug information from stand alone version.
06/01/08:
Added debug information.
09/10/07:
Moved to system.
16/09/07:
Added list sorting.
Made this part of Y SeRver Includes, not Y Sever Includes.
Made list sorting optional.
Fixed version number.
08/09/07:
First version.
Re: foreach 0.4.1 standalone include - Emmet_ - 14.04.2015
Thanks for re-posting this. It's great that everyone is starting to post his work again, since a lot of people rely on it for their projects.
Re: foreach 0.4.1 standalone include -
Crayder - 15.04.2015
Quote:
Originally Posted by Kar
Why are you guys complaining.. I have done nothing wrong....
|
How was I complaining? I was merely stating something. Y_Iterate was built off of foreach (mostly) so therefore foreach has been part of YSI. I didn't say you did anything wrong!
Re: foreach 0.4.1 standalone include -
Abagail - 15.04.2015
Good job releasing this as a standalone include again, - I hate how YSI dominates everything ****** produced, it's nice to see something he didn't force people into using with YSI still being worked on.
Re: foreach 0.4.1 standalone include -
Sasino97 - 05.09.2015
Quote:
Originally Posted by Abagail
Good job releasing this as a standalone include again, - I hate how YSI dominates everything ****** produced, it's nice to see something he didn't force people into using with YSI still being worked on.
|
This is the same thing I wanted to say lol
Re: foreach 0.4.1 standalone include -
n0minal - 28.09.2015
What's the proper way to use this version of foreach?
Код:
foreach(new playerid : Player)
or
foreach(Vehicle, i)
What's the correct syntax of this version?
Sorry for the dumb question, I'm just updating my server includes...
Re: foreach 0.4.1 standalone include -
Crayder - 28.09.2015
Quote:
Originally Posted by ipsLeon
What's the proper way to use this version of foreach?
Код:
foreach(new playerid : Player)
or
foreach(Vehicle, i)
What's the correct syntax of this version?
Sorry for the dumb question, I'm just updating my server includes...
|
It uses the new syntax. The latest version (which must have YSI) is still the best though.
Re: foreach 0.4.1 standalone include -
n0minal - 29.09.2015
Quote:
Originally Posted by Crayder
It uses the new syntax. The latest version (which must have YSI) is still the best though.
|
I'm getting this weird error when compiling with this syntax (not sure if it's the new or old):
Код:
foreach(new i : Vehicle)
{
static Float:vehPos[3];
GetVehiclePos(i, vehPos[0], vehPos[1], vehPos[2]);
if(distance(vehPos[0], vehPos[1], vehPos[2], x2, y2, z2) < 7.0) return false;
}
Код:
error 017: undefined symbol "Vehicle@YSII_Ag"
Am I using a wrong syntax?
Re: foreach 0.4.1 standalone include -
Kar - 29.09.2015
Did you create the Vehicle iter?
Re: foreach 0.4.1 standalone include -
Abagail - 29.09.2015
Vehicle isn't pre-defined with the new syntax, though Player is. That error means the iter doesn't exist in the current context.
Re: foreach 0.4.1 standalone include -
n0minal - 29.09.2015
Quote:
Originally Posted by Kar
Did you create the Vehicle iter?
|
I didn't, sorry.
Re: foreach 0.4.1 standalone include -
Crayder - 29.09.2015
Quote:
Originally Posted by Abagail
Vehicle isn't pre-defined with the new syntax, though Player is. That error means the iter doesn't exist in the current context.
|
Yes it is pre-defined, but not in this old standalone.
Quote:
Originally Posted by Kar
Did you create the Vehicle iter?
|
Quote:
Originally Posted by ipsLeon
I didn't, sorry.
|
The vehicle iterator is only in the YSI library version.
Re: foreach 0.4.1 standalone include -
Droxx - 07.01.2016
Good Job