Raised This Month: $ Target: $400
 0% 

[HELP] Run time error 10:


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 11-15-2015 , 10:28   Re: [HELP] Run time error 10:
Reply With Quote #1

It looks to me like a player is already viewing the menu and you try to show them the menu again. I was able to reproduce it to confirm.

To fix:
Add global variable:
PHP Code:
new bool:g_bIsViewingMenuMAX_PLAYERS ]; 
In StartVote, replace 'menu_display(tempid, gGVoteMenu)' with:
PHP Code:
if ( !g_bIsViewingMenutempid ] )
{
    
menu_display(tempidgGVoteMenu)        
    
g_bIsViewingMenutempid ] = true;

Add:
PHP Code:
public client_disconnectid )
{
    
g_bIsViewingMenuid ] = false;

Add to menu handler function:
Code:
public votemap(id, menu, item) {     g_bIsViewingMenu[ id ] = false;
__________________

Last edited by Bugsy; 11-15-2015 at 10:28.
Bugsy is offline
Reply



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 18:09.


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