Raised This Month: $ Target: $400
 0% 

randomize menus


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 10-01-2014 , 05:07   Re: randomize menus
Reply With Quote #1

You can't directly execute code that is in a string.

The "data" field of the 'new menus' should be used to keep appropriate associations between the options in the menu and the menu handler.

So, you would need one array for the menu options and another for the unique data identifier (this value will be an integer that will be used in the switch of the menu handler). Simply get your random value with what ever method you want. Use that cached random value to register the menu item with the menu option and the data identifier.

Your menu handler will never need to change.
__________________

Last edited by fysiks; 10-01-2014 at 05:08.
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 17:39.


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