Raised This Month: $7 Target: $400
 1% 

[Solved] How to save a player choice?


Post New Thread Reply   
 
Thread Tools Display Modes
FoxueR
Senior Member
Join Date: Jun 2011
Old 06-27-2011 , 09:23   Re: How to save a player choice?
Reply With Quote #11

Quote:
Originally Posted by fysiks View Post
That is entirely upto the coder. You don't have to use the key (item) variable as the identifier. If option 0 is coded as "having not selected anything yet" then it will work just fine.
By default, the item selected which is passed into the menu handler starts at 0:

PHP Code:
public menu_handler(idmenuitem
In this case, he's using data passed into the info section of the item, which is a waste of time and doesn't provide any extra information.
__________________
¯\_(ツ)_/¯
FoxueR is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 06-27-2011 , 15:29   Re: How to save a player choice?
Reply With Quote #12

Quote:
Originally Posted by FoxueR View Post
By default, the item selected which is passed into the menu handler starts at 0:

PHP Code:
public menu_handler(idmenuitem
In this case, he's using data passed into the info section of the item, which is a waste of time and doesn't provide any extra information.
Some of the experienced coders know this but it's clear that he is not all that experienced. Regardless, you can still use 0 of he wants to do so. It can be optimized later if he really wants to do so.
__________________
fysiks is offline
FoxueR
Senior Member
Join Date: Jun 2011
Old 06-27-2011 , 18:50   Re: How to save a player choice?
Reply With Quote #13

Quote:
Originally Posted by fysiks View Post
Some of the experienced coders know this but it's clear that he is not all that experienced. Regardless, you can still use 0 of he wants to do so. It can be optimized later if he really wants to do so.
It's more an issue of design than optimization. You're right though, it's fairly trivial.
__________________
¯\_(ツ)_/¯
FoxueR is offline
ImXinR
Member
Join Date: Dec 2010
Old 06-28-2011 , 03:35   Re: How to save a player choice?
Reply With Quote #14

Ok Thanks
__________________
Sometimes , Life Sucks .. Don't You Agree? But ,
Listening To Music Make Us Feel Better
ImXinR is offline
Reply


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 03:13.


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