I have called a function with a menu. Once the user calls this function for the first time its getting executed correctly. But for the second time the menu just dont appear. The Code Complies without any errors and warnings. No errors about the plugin in console and no error logs. Also the Code contains file handling.
PHP Code:
#define B1 1 << 0;
#define B0 1 << 9;
new gKeyslolMenu = B1 | B0;
public plugin_init()
{
register_clcmd("say /lol", "lolMenu");
register_menucmd(register_menuid("lolMenu"), gKeyslolMenu, "handlelolMenu");
}
public lolMenu(id)
{
new szMenu[256];
add( szMenu , 256 , "\r1. \wCall lol Menu Test^n" );
add( szMenu , 256 , "\r0. \wClose" );
show_menu( id , gKeyslolMenu , szMenu , -1 , "lolMenu" );
}
public handlelolMenu(id, num)
{
switch (num)
{
case N1: { lolProcess; }
case N0: { return; }
}
if (num != N1 && num != N9)
{
lolMenu(id);
}
}
public lolProcess( id )
{
// Sum huge variables
// Big loops
// File open and get data from file.
// Use of Cstrike and fun functions.
// fclose.
}