Loops
How would I make something loop 5 times with for()?
Edit: Is this right? Code:
|
Yep, just make sure to declare i
|
Heh, knew that. Thanks :).
Only ones I've ever worked with are while() loops using MySQL.. |
uhh..but remember that arrays go from 0 to n-1...
That is, to access all the elements of array something[]... Code:
|
Sorry to steal his attention but , how would you loop a task? For example , one to take away 5 hp every second for 10 seconds , thanks.
|
Quote:
Anyhow, I'd like to know that too :). |
Yeah , because I'm working on a plugin that needs that... but I tried looking into the WC3 code... one of them just linked me to a piece of code , another was so huge I couldn't even find the functions I was looking for...
|
OOO, actually...take a look @ xeroblood's AIO menu :).
Poison.. Code:
|
Yes, that method will work, and is called Recursion (when a functon calls itself).
Here is a simpler example: Code:
|
Nice :).
|
| All times are GMT -4. The time now is 14:02. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.