Questions about "foreach" include - 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: Questions about "foreach" include (
/showthread.php?tid=650799)
Questions about "foreach" include -
Watermelonnable - 06.03.2018
Hi guys.
1) What's the foreach use?
2) Where can I get the newest foreach version?
3) Where can I read the "foreach" documentation?
I'm gonna read a mysql registration system which use foreach include, but it's on mysql R-41-2 and I'm gonna use mysql R-41-4, so, I want to update everything that needs to be updated in this version.
Re: Questions about "foreach" include -
StrikerZ - 07.03.2018
1) Foreach loops ONLY through the connected players which is fast.
2)
https://github.com/karimcambridge/SAMP-foreach/releases
3) Here is a tutorial with combination with iterates (Which are really good for looping for other systems)
https://sampforum.blast.hk/showthread.php?tid=571159
Re: Questions about "foreach" include -
sammp - 07.03.2018
Is SA-MP foreach the same as .NET in the sense that if you wanted index looping, you'd opt for for() rather than foreach()? edit// i'm just wondering if foreach in sa-mp has add, remove and edit powers.
But anyways, I'd use foreach() if you wanted to loop through a collection of items where you don't care for the index. At least that's how it's conventionally used, right?
Re: Questions about "foreach" include -
Watermelonnable - 07.03.2018
Quote:
Originally Posted by ******
2) Why do you want to use a specific library to write something? Use the libraries that solve the problems you have; don't just decide you're going to use one with no knowledge of what it does in advance.
|
If you'r referring to MySQL R41-4 it's because I want to have all my systems up to the newest version.
If you're referring to foreach it's because the guide I'm gonna read is using it:
MySQL [R41-2] Registration System
Thanks to everyone for your replies !
Re: Questions about "foreach" include -
sammp - 07.03.2018
Quote:
Originally Posted by Watermelonnable
If you'r referring to MySQL R41-4 it's because I want to have all my systems up to the newest version.
If you're referring to foreach it's because the guide I'm gonna read is using it:
MySQL [R41-2] Registration System
Thanks to everyone for your replies !
|
His point is that there is no point updating your mysql version if you're not going to take advantage of it. unless it has major security updates
Re: Questions about "foreach" include -
Uberanwar - 07.03.2018
Quote:
Originally Posted by ******
Actually, iterators can loop over anything you want. Players are a common use, but not the only one.
The stand-alone version is stuck at version 19. The YSI version is currently on version 43:
https://github.com/pawn-lang/YSI-Includes
|
Sadly YSI with JIT is incompatible, had to use standalone
Re: Questions about "foreach" include -
Zeus666 - 16.03.2018
Quote:
Originally Posted by ******
|
wow ******