Raised This Month: $ Target: $400
 0% 

Menu code gets a warning?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
hlstriker
Green Gaben
Join Date: Mar 2006
Location: OH-IO!
Old 12-11-2006 , 16:48   Re: Menu code gets a warning?
Reply With Quote #3

Wow I feel extremely stupid for not catching that! Anyhow, now that is fixed, I get errors.

Here are the errors...
Quote:
(990) : error 017: undefined symbol "menu"
(1005) : error 017: undefined symbol "menu"
I know it's the variable menu that doesn't exist, but I don't know what to do in place of it. I tried putting "szMenuBody", it compiled fine, but in the game it didn't work.

BTW, here is the code where the errors are, I will comment the error lines.
Code:
public mainMenu(id) {     if(access(id, ADMIN_BAN)) {         new szMenuBody[256];         new key = MENU_KEY_0|MENU_KEY_1|MENU_KEY_2|MENU_KEY_3|MENU_KEY_4|MENU_KEY_5|MENU_KEY_6|MENU_KEY_7|MENU_KEY_8|MENU_KEY_9;                 new nLen = format(szMenuBody, 255, "\yMain Menu:^n");                 nLen += format(szMenuBody[nLen], 255-nLen, "^n\w1. Add Start Timer");         nLen += format(szMenuBody[nLen], 255-nLen, "^n\w2. Add End Timer");         nLen += format(szMenuBody[nLen], 255-nLen, "^n\w3. Remove Start Timer");         nLen += format(szMenuBody[nLen], 255-nLen, "^n\w4. Remove End Timer");         nLen += format(szMenuBody[nLen], 255-nLen, "^n^n\w5. Save Position");         nLen += format(szMenuBody[nLen], 255-nLen, "^n\w6. Load Position");         nLen += format(szMenuBody[nLen], 255-nLen, "^n\w7. Cancel Timed Run");         nLen += format(szMenuBody[nLen], 255-nLen, "^n\w8. Give Quad");         nLen += format(szMenuBody[nLen], 255-nLen, "^n\w9. Give God");                 nLen += format(szMenuBody[nLen], 255-nLen, "^n^n\w0. Exit");                 show_menu(id, key, menu, -1, "menu_mainMenu"); // ERROR     } else {         new szMenuBody[256];         new key = MENU_KEY_0|MENU_KEY_1|MENU_KEY_2|MENU_KEY_3|MENU_KEY_4|MENU_KEY_5;                 new nLen = format(szMenuBody, 255, "\yMain Menu:^n");                 nLen += format(szMenuBody[nLen], 255-nLen, "^n\w1. Save Position");         nLen += format(szMenuBody[nLen], 255-nLen, "^n\w2. Load Position");         nLen += format(szMenuBody[nLen], 255-nLen, "^n\w3. Cancel Timed Run");         nLen += format(szMenuBody[nLen], 255-nLen, "^n\w4. Give Quad");         nLen += format(szMenuBody[nLen], 255-nLen, "^n\w5. Give God");                 nLen += format(szMenuBody[nLen], 255-nLen, "^n^n\w0. Exit");                 show_menu(id, key, menu, -1, "menu_mainMenu"); //ERROR     }         return PLUGIN_HANDLED; }
hlstriker is offline
 



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 06:49.


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