Raised This Month: $ Target: $400
 0% 

Voting menu won't display.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 07-20-2011 , 11:33   Re: Voting menu won't display.
Reply With Quote #1

That's an ugly loop.

PHP Code:
public EndVote()
{
    new 
best 0;
    for(new 
1sizeof(gVotes); i++)
    {
        if(
gVotes[i] > gVotes[best])
            
best i;
    }
    
    if(
best == 4)
    {
        
client_print(0print_chat"%s The current map will be extended for this match. Match will start in 10 seconds."PREFIX);
        
set_task(10.0"StartMatch");
    }
    else
    {
        
client_print(0print_chat"%s The map will be changed within 10 seconds. The map that was chosen is: %s."PREFIXmapschosen[best]);
        
changemapto best;
        
set_task(10.0"ChangeMap");
    }

Anyway, those "continue" statements are causing an infinite loop (server crash) and should be "break".
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] 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 00:51.


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