error 033: array must be indexed
An extract from a plugin I'm making.
I guess what the error means is that the array used in teleother_confirm_menu = menu_create(teleother_confirm_menu_name[id],"teleother_confirm_menu_handle") must be constant but im using a variable I tried to fix it by formatting a string with the id already in it but it doesn't work. PHP Code:
Thanks. EDIT: Other problem. The reason I have used arrays for a menu is because I couldn't think of any other way. What I thought: The menu is specific to a single player, so it can't be global/constant because then it wouldn't be specific as each player would see the same menu? Solution, have many different menu's? EDIT2: This code is so baad >.< |
Re: error 033: array must be indexed
That code is so bad
|
Re: error 033: array must be indexed
Try this chief:
PHP Code:
PHP Code:
|
Re: error 033: array must be indexed
Yeh, I should have worked that out from the compiler error. Thanks. Also, how would I pass a variable in:
menu_additem(menu_id, "no", id) as id errors to: error 035: argument type mismatch (argument 3) |
Re: error 033: array must be indexed
Quote:
You can parse multiple data into the third argument and then extract it later. That is only one suggestion, there might be better ways. |
| All times are GMT -4. The time now is 01:35. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.