Raised This Month: $51 Target: $400
 12% 

For(new i) help


Post New Thread Reply   
 
Thread Tools Display Modes
Crackhead69
Member
Join Date: Feb 2021
Old 02-16-2021 , 04:51   Re: For(new i) help
Reply With Quote #11

Quote:
Originally Posted by fysiks View Post
The modulus is not a bitwise operation and is a common question asked. Therefore, there are many articles/posts that explain how it works. For example, this one looks like it has a good explanation.
Ah thanks! I understood it
So it goes x%2 looping between 0 and 1 in this situation.

Quote:
Originally Posted by fysiks View Post
Prefixing a variable with "g" or "g_" is most often used to indicate a variable is a global variable so it's confusing when you have a variable (gCounter) that is not global.
I meant to make gCounter global, my mistake.

Quote:
Originally Posted by fysiks View Post
It's not quite clear what exactly you're requesting (because you use the term "limit" in one post and then "spam" in another which are effectively opposites). Could you please write out the sequence of messages that you want to occur. For example: "hello, hello, world, world, hello, hello" or "hello, hello, hello, world, hello hello hello, world", etc.
Sorry for my bad explanatory skills.
I want the messages to occur a Limited amount of times.
"Hello, hello, hello"
when it says "Hello" 3 times, to switch by saying
"world, world, world" instead of "hello".
Crackhead69 is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 02-16-2021 , 23:17   Re: For(new i) help
Reply With Quote #12

The easiest way to make any type of pattern with my original example is to just put the pattern in the array:

PHP Code:
new g_szStringArray[][] = {"hello""hello""hello""world""world""world"
So, based on the little information given, this is what I would recommend. If you are trying to do something more complicated then you should explain better what you are actually trying to do.
__________________
fysiks is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 07:22.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode