PDA

View Full Version : Bug in the random midnight event? (Bring the SUV up to the cabin)



File Sponge
10-06-2007, 04:09 AM
Anyone else seeing their players get 100 million plus points from a random midnight event that appears to be hard-coded into the application? I think BBSFiles had the same problem.

Seth
10-07-2007, 01:48 AM
Hmm, thanks for the heads up.

I have checked the code and don't see any obvious errors, but I'll set up a test that runs that event a few thousand times and see if I notice anything wrong. It seems to be the LONGEST event textwise, (~400 characters) but everything should be fine even that length.

That event is read from a data file btw, it is a text file called news_blurbs.txt, so that specific event can be removed if need be.

cthulhu
04-14-2008, 09:49 PM
Hi, I just had this event happen to me on the BBSFiles server. I got 1400 million bp (or there abouts) so the problem is still there. Just thought I'd let you know.

FearTheWhammy
04-15-2008, 11:20 PM
Thanks for looking into this. I figured I'd still be in first place, or maybe someone would leapfrog me...and then I noticed I'm about 10 million behind and thought someone was cheating. :)

Seth
04-15-2008, 11:26 PM
Yikes, thanks for the update. Did the same 'event' (bring SUV up to the cabin) appear on the daily log?

FearTheWhammy
04-15-2008, 11:36 PM
Just as important to fixing the bug, how can BBSFiles repair the tournament we're on? Can they reset to 2 days ago? We're on Day 19 or something, and I know I've put in many hours on this game and have sure others have done the same.

Seth
04-16-2008, 12:33 AM
The only way to fix the game in progress is the admin has to use the player editor to manually change the guy back to pre-bug levels.

Unless he backups the FQ data and has that laying around.

FearTheWhammy
04-16-2008, 02:34 AM
Yikes, thanks for the update. Did the same 'event' (bring SUV up to the cabin) appear on the daily log?

I don't know what it said to Cthulhu, but in the newspaper it says "Rl'yeah discreetly removes the bodies from the haunted cabin, woodshed."

ServerHost
04-16-2008, 11:32 AM
The event shows:

give_random|`w

then more text about the event, then:

mod_bp|50

So maybe "give_random" has some huge range it can randomly select from.. if so, it's not a bug ... just a configuration issue...

Seth: if you know more, let me know... otherwise I will presume "give_random" is what it means... 1 to millions ...

maybe it's something else, but I don't see anything that looks out of the ordinary


hmmm... maybe it should say:

mod_bp|50|50

instead of:

mod_bp|50

since that doesn't set a top limit ???

Seth
04-16-2008, 11:53 AM
ServerHost, I think you just fixed the problem. :p

I checked the source, and indeed, there should always be a low AND high range specified. It appears when I cut and pasted some donated text events I was less than meticulous about checking them for errors.

You can edit it yourself (same rules apply to mod_turns and mod_luck.. but only matter if a give_random is active) or you can download the fixed version I'm attaching.

I'll probably add some of the recent suggestions to the server and package a new release pretty soon, but until then everyone should fix this by replacing (or editing) this file...

ServerHost
04-16-2008, 06:54 PM
Yes, I found others in that same file where there was no top end, but don't know if they had the "give_random" statement as well.. so I just added the top end to match the low end on those (maybe 3 ? others)...

jjohn
04-21-2008, 04:02 PM
It appears when I cut and pasted some donated text events I was less than meticulous about checking them for errors.


Seth,

That's probably my bug. I believe I thought that without a range, the mod_bp would just grant the number given. Using a Perl for so long, I just expect a certain about of DWIM. However, I thought that there were some events that doled out static BP amounts, which is what that event was based on.

In any case, the simple fix is to add that upper limit.

Programming is hard...

--Joe

Seth
04-21-2008, 08:30 PM
No problem jjohn, happens to the best of us. :) I definitely should have put error checking in that load function... :p