Raised This Month: $51 Target: $400
 12% 

total health of bosses with multiple lives


Post New Thread Reply   
 
Thread Tools Display Modes
Wliu
Veteran Member
Join Date: Apr 2013
Old 06-18-2014 , 18:29   Re: total health of bosses with multiple lives
Reply With Quote #11

Going slightly off-topic:
My god the chances code is broken. I don't even know how it compiles.
As it is, I've found an infinite for loop that incorrectly assigns values to an array. Later on, the array breaks...again (assuming the code ever gets to there, which it by all means shouldn't).

Code:
for(chancesIndex=3; stringChances[chancesIndex][0]; chancesIndex+=2)  //TODO: This seems like an infinite loop
{
	chances[chancesIndex/2]=StringToInt(stringChances[chancesIndex])+chances[chancesIndex/2-1];  //chances[1.5].  What in the world?
}
chancesIndex-=2;

...*snip*

new i=GetRandomInt(0, chances[chancesIndex/2]);
Q_Q
__________________
~Wliu

Last edited by Wliu; 06-18-2014 at 18:30.
Wliu is offline
WildCard65
Veteran Member
Join Date: Aug 2013
Location: Canada
Old 06-19-2014 , 11:26   Re: total health of bosses with multiple lives
Reply With Quote #12

I think the chances bit is for the keyvalue bit for chances for bosses.
WildCard65 is offline
Wliu
Veteran Member
Join Date: Apr 2013
Old 06-19-2014 , 12:54   Re: total health of bosses with multiple lives
Reply With Quote #13

Yes, it is. But it's totally broken right now.
__________________
~Wliu
Wliu 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 09:01.


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