Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Runtime Error 6: Overflow
#1
Well, the runtime error fixes post didn't help me out much here haha. What is happening is I am getting a Runtime Error 6: Overflow on the server. I can't seem to pinpoint it to anything yet, I have been testing the server in many different ways and it only will occur when it is compiled so I cannot load it in VB and debug it that way. It only seems to occur once in awhile, I haven't timed it yet to see how long it takes or anything but it's quite a while I believe. More or less I am just wondering if there is a way to locate a coding error without searching the entire thing for a tiny mistake. Overflow is when a byte is being stored as something beyond 255 correct? So is there a way to find something thats attempting to store any byte within the code thats higher than that? I hope this is making sense to everyone haha. Any help on how to track something down like that would be great. Thanks a lot.
Reply
#2
It means a value is being assigned for a variable outside of it's known range. e.g., you have something that's like Max_Players as Byte, and then it is looking at player number 256, even though the max byte value is 255.

Just figure out what part is overflowing, then up the variable Smile
Reply
#3
Thats what I said haha. I am just wondering if there is a quicker way to find the byte thats giving me the error than searching every bit of code.
Reply
#4
just use debug in VB6, run from the IDE and whala when it errors, itll point to the line.
Reply
#5
If its a long time, it might be the 'saveplayer' sub.
Quote:Robin:
Why aren't maps and shit loaded up in a dynamic array?
Jacob:
the 4 people that know how are lazy
Robin:
Who are those 4 people?
Jacob:
um
you, me, and 2 others?
Reply
#6
You stated that it only appears once in a while right? Well the first few steps to find and fix this bug is to first to figure out how to produce the error. So work out what you have to do, to get this error appear.. Then work back from there..
Reply
#7
Well I managed to track it down to the save player section, thanks Kite. It had to do with Shadows save player code, where he makes the game save one player at a time. Not sure exactly why it is happening just yet.

-edit-

Coming to my senses after sitting and eating a bowl of Cheerios it just hit me that it is obviously the Max_Players constant. I looked and it was set to 500 XD. So I fixed that right away and so far so good on the saving of players. Thanks for the help.
Reply
#8
Heh, thats the same problem i had xD
Quote:Robin:
Why aren't maps and shit loaded up in a dynamic array?
Jacob:
the 4 people that know how are lazy
Robin:
Who are those 4 people?
Jacob:
um
you, me, and 2 others?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)