Raised This Month: $ Target: $400
 0% 

Simple plugin freezes game on load


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
E1_531G
Senior Member
Join Date: Dec 2017
Old 12-18-2018 , 15:00   Re: Simple plugin freezes game on load
Reply With Quote #2

Quote:
while(get_cvar_num("autobalance_level")==0) // if this cvar is 0, you have infinite loop
{
//for(new rate=0;rate<100;rate++)
//{
new level=get_playersnum()-1
ab_adjust(level)
//}
}
This is an ifinite loop => crash.

Also, 0.5 task is overkill:
Quote:
set_task(0.5,"ab_balance",0,"",0,"b")
Learn about loops.
__________________
My English is A0

Last edited by E1_531G; 12-18-2018 at 15:00.
E1_531G is offline
 



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 07:36.


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