Server Help Forum Index Server Help
Community forums for Subgame, ASSS, and bots
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   StatisticsStatistics   RegisterRegister 
 ProfileProfile   Login to check your private messagesLogin to check your private messages   LoginLogin (SSL) 

Server Help | ASSS Wiki (0) | Shanky.com
Prize Weight Crash?

 
Post new topic   Reply to topic Printable version
 View previous topic  Ship Settings Post :: Post bullet sizes  View next topic  
Author Message
Vibe
Guest


Offline

PostPosted: Tue Jun 15, 2004 12:56 pm    Post subject: Prize Weight Crash? Reply to topic Reply with quote

I think it's happened before but is it possible for a server to crash if the [PrizeWeight] values are too close together or there are a lot that are the same value?
Back to top
Cyan~Fire
I'll count you!
I'll count you!


Age:37
Gender:Gender:Male
Joined: Jul 14 2003
Posts: 4608
Location: A Dream
Offline

PostPosted: Tue Jun 15, 2004 1:22 pm    Post subject: Reply to topic Reply with quote

No, it should never crash as long as they are not all 0.
_________________
This help is informational only. No representation is made or warranty given as to its content. User assumes all risk of use. Cyan~Fire assumes no responsibility for any loss or delay resulting from such use.
Wise men STILL seek Him.
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
D1st0rt
Miss Directed Wannabe


Age:37
Gender:Gender:Male
Joined: Aug 31 2003
Posts: 2247
Location: Blacksburg, VA
Offline

PostPosted: Tue Jun 15, 2004 1:31 pm    Post subject: Reply to topic Reply with quote

lol that was fun biggrin.gif
_________________

Back to top
View users profile Send private message Add User to Ignore List Visit posters website
Lumenesc
Novice


Age:37
Gender:Gender:Male
Joined: Jun 19 2003
Posts: 58
Location: Texas
Offline

PostPosted: Tue Jun 15, 2004 1:32 pm    Post subject: Reply to topic Reply with quote

If you have alot the same level, then youll just have alot with an equal chance of getting picked, no reason for it to crash.

And you couuuld have them all zero..if you didnt have any greens
_________________
Are you sure this questoin involved an answer?
Back to top
View users profile Send private message Add User to Ignore List Visit posters website AIM Address
Cyan~Fire
I'll count you!
I'll count you!


Age:37
Gender:Gender:Male
Joined: Jul 14 2003
Posts: 4608
Location: A Dream
Offline

PostPosted: Tue Jun 15, 2004 8:12 pm    Post subject: Reply to topic Reply with quote

Death Prizes. They're always generated.
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
Mr Ekted
Movie Geek


Gender:Gender:Male
Joined: Feb 09 2004
Posts: 1379
Offline

PostPosted: Tue Jun 15, 2004 10:36 pm    Post subject: Reply to topic Reply with quote

Say there were 3 prize types A, B, and C with weights set. You want to pick one randomly based on the weights. You start by generating a random number from 0 to A+B+C-1, then walking list weight array, subtracting weights from the random number until it is < the current prize's weight. Generating a random number from 0 to n-1 is usually done by

rand() % n;

If n is 0, you get divide by zero error. Bling.
_________________
4,691 irradiated haggis!
Back to top
View users profile Send private message Add User to Ignore List
Lumenesc
Novice


Age:37
Gender:Gender:Male
Joined: Jun 19 2003
Posts: 58
Location: Texas
Offline

PostPosted: Wed Jun 16, 2004 1:44 pm    Post subject: Reply to topic Reply with quote

Buut couldnt you make the death prizes last for like 1 millesecond? or for 0 maybe im pretty sure there was a way to not have death prizes
Back to top
View users profile Send private message Add User to Ignore List Visit posters website AIM Address
Display posts from previous:   
Post new topic   Reply to topic    Server Help Forum Index -> General Questions All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum
View online users | View Statistics | View Ignored List


Software by php BB © php BB Group
Server Load: 394 page(s) served in previous 5 minutes.

phpBB Created this page in 0.568259 seconds : 32 queries executed (95.7%): GZIP compression disabled