AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Compiling errors about menu_destroy (https://forums.alliedmods.net/showthread.php?t=246275)

EpicKiller 08-14-2014 18:26

Compiling errors about menu_destroy
 
1 Attachment(s)
So... I made that VIP menu that friend asked me to do. But it returns some errors that I can't explain to myself. I also made a test plugin, which compiles absolutely clean... again, I really doent get it.

So, here's my code.
Spoiler

And here's the test plugin.
Spoiler


So.. what's wrong? Please, help!

EDIT: Sorry, I apparently forgot to mention the errors. I attached a snapshot.

Nextra 08-14-2014 19:34

Re: Compiling errors about menu_destroy
 
The variable "vipmenu" is not a global variable. Inside of the menu handler you get the menu id passed through in the "menu" variable, so you have to write:

PHP Code:

menu_destroy(menu); 


EpicKiller 08-15-2014 09:11

Re: Compiling errors about menu_destroy
 
Quote:

Originally Posted by Nextra (Post 2184126)
The variable "vipmenu" is not a global variable. Inside of the menu handler you get the menu id passed through in the "menu" variable, so you have to write:

PHP Code:

menu_destroy(menu); 


That really didn't cross my mind for a second. Thank you so much!


All times are GMT -4. The time now is 13:14.

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