Raised This Month: $ Target: $400
 0% 

How to transfer a lot of options in "for" operator


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Nextra
Veteran Member
Join Date: Apr 2008
Location: Germany
Old 05-30-2015 , 04:37   Re: How to transfer a lot of options in "for" operator
Reply With Quote #7

You already have a lookup table that is indexed by your item numbers. If your code is more complex than the example you provided, you should always look towards crafting this type of setup, where you simply retrieve from an array index - it doesn't matter if it is of constant size or dynamic. If you have a case where you feel that a for loop is actually necessary, you need to update your example and show us.

Code:
if (g_options[id][iItem]) {    return MENU_DISABLED; }
__________________
In Flames we trust!

Last edited by Nextra; 05-30-2015 at 04:43.
Nextra is offline
 


Thread Tools
Display Modes

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 18:42.


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