Prevent double looping
Hi,
How can I prevent using a for() loop inside another for() loop, lol. This is my current code PHP Code:
PHP Code:
PHP Code:
Thanks!! |
Re: Prevent double looping
Just do it if you have to, there's nothing bad with that.
|
Re: Prevent double looping
Quote:
Quote:
BUT, I realized I don't need the 2nd loop so I'm okay for now. |
Re: Prevent double looping
Just a point: If the 1st loop hits g_szWeapons number, then no more weapons should be spawned, so it's ok to break the 2nd loop.
|
Re: Prevent double looping
Use if else with a bool, or just use this!
|
Re: Prevent double looping
Quote:
Quote:
|
Re: Prevent double looping
I don't even understand what you mean by "double looping", nested loops are a normal thing.
|
Re: Prevent double looping
Quote:
|
Re: Prevent double looping
Quote:
|
Re: Prevent double looping
Quote:
Quote:
|
| All times are GMT -4. The time now is 12:28. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.