need help with menu strings
PHP Code:
I would like to get the name of chosen country in my handler ... PHP Code:
Error: Argument type mismatch (argument 3) |
Re: need help with menu strings
1. Make your data array bigger
PHP Code:
PHP Code:
PHP Code:
4. Replace all occurrences of iCountry with data You were trying to turn the country name string into a number (integer), and then copy that integer into a string... btw, you should rename iSelectedCountry to szSelectedCountry, though it isn't necessary. |
Re: need help with menu strings
The above post is unnecessary.
It surprises me how little people think about the things they are typing, and just copy the way others get things done. You name one of your variables iName and it doesn't occur to you that maybe that's the name of the option? Code:
|
Re: need help with menu strings
Quote:
|
Re: need help with menu strings
What you should do in the first place is making the country names properly to a global array, like that creating the menu is much cleaner in a loop ( Even you didn't have more than two countries which I doubt ). After we've followed good habits it's easy to get the name with the item index in the handler so that no menu_item_getinfo is needed. All the benefits of using indexes for countries included.
|
Re: need help with menu strings
Quote:
I was mistaken. My testing didn't work correctly. |
Re: need help with menu strings
Quote:
|
Re: need help with menu strings
Quote:
|
Re: need help with menu strings
Quote:
EDIT: I was wrong, I must not have gotten the correct .amxx when I was trying to test it. |
| All times are GMT -4. The time now is 02:07. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.