Raised This Month: $ Target: $400
 0% 

Menu code gets a warning?


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

Hey everyone, I'm trying to make a menu (I yanked alot of this menu code from another post). My problem is when I compile it gives me a warning.

Here is the warning it gives me...
Quote:
(1113) : warning 203: symbol is never used: "mainMenu"
I don't even have 1113 lines of code!

Here is all the code I use for the menu...
Code:
public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR);     register_clcmd("say /menu", "mainMenu");     register_menucmd(register_menuid("menu_mainMenu"), 1023, "menuAction_mainMenu"); } 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");     } 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");     }         return PLUGIN_HANDLED; } public menuCommand(id, key) {     if(access(id, ADMIN_BAN)) {         switch(key) {             case 0: {                 setStart(id);                 client_cmd(id, "speak ^"csm/menuselect.wav^"");                 }             case 1: {                 setEnd(id);                 client_cmd(id, "speak ^"csm/menuselect.wav^"");                 }             case 2: {                 removeStart(id);                 client_cmd(id, "speak ^"csm/menuselect.wav^"");                 }             case 3: {                 removeEnd(id);                 client_cmd(id, "speak ^"csm/menuselect.wav^"");                 }             case 4: {                 savePosition(id);                 client_cmd(id, "speak ^"csm/menuselect.wav^"");                 }             case 5: {                 loadPosition(id);                 client_cmd(id, "speak ^"csm/menuselect.wav^"");                 }             case 6: {                 cancelTimer(id);                 client_cmd(id, "speak ^"csm/menuselect.wav^"");                 }             case 7: {                 giveQuad(id);                 client_cmd(id, "speak ^"csm/menuselect.wav^"");                 }             case 8: {                 set_user_godmode(id, 1);                 client_cmd(id, "speak ^"csm/menuselect.wav^"");                 }         }     } else {         switch(key) {             case 0: {                 savePosition(id);                 client_cmd(id, "speak ^"csm/menuselect.wav^"");                 }             case 1: {                 loadPosition(id);                 client_cmd(id, "speak ^"csm/menuselect.wav^"");                 }             case 2: {                 cancelTimer(id);                 client_cmd(id, "speak ^"csm/menuselect.wav^"");                 }             case 3: {                 giveQuad(id);                 client_cmd(id, "speak ^"csm/menuselect.wav^"");                 }             case 4: {                 set_user_godmode(id, 1);                 client_cmd(id, "speak ^"csm/menuselect.wav^"");                 }         }     } }

If anyone can help me fix this please do !
hlstriker is offline
 


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


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