Questions about "foreach" include
#1

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.
Reply
#2

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
Reply
#3

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?
Reply
#4

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 !
Reply
#5

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
Reply
#6

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
Reply
#7

Quote:
Originally Posted by ******
Посмотреть сообщение
wow ******
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)