Mirage Source http://web.miragesource.net/forums/ |
|
Runtime 6 - Overflow ? http://web.miragesource.net/forums/viewtopic.php?f=201&t=2343 |
Page 1 of 4 |
Author: | JohnY [ Wed Jul 25, 2007 1:29 pm ] |
Post subject: | Runtime 6 - Overflow ? |
I was working on my inventory and when I try to login to my game I get Runtime 6, Overflow, it highlights this: Does anyone know what causes overflow? I tried to figure out the answer, but couldn't find anything usefull. EDIT: I tried making a new character and login. Now I get runtime 9 - Subscript out of range. |
Author: | Robin [ Wed Jul 25, 2007 2:27 pm ] |
Post subject: | Re: Runtime 6 - Overflow ? |
I'm guessing you're trying to set it as a number too high. Hover your mouse over "invslot" and screenshot it, and also take a screenshot with your mouse hovering over "itemnum" |
Author: | William [ Wed Jul 25, 2007 9:46 pm ] |
Post subject: | Re: Runtime 6 - Overflow ? |
JUst add a small checK: Code: If invslot < 0 or invslot > MAX_INV then exit sub if itemnum < 0 or itemnum > MAX_ITEMS then exit sub This will solve the error but if you get problems you should dig more into were it starts etc. |
Author: | Robin [ Wed Jul 25, 2007 10:28 pm ] |
Post subject: | Re: Runtime 6 - Overflow ? |
If I were you, I'd only use checks like that during release, otherwise there wont be a nice yellow bar telling you where your source is fucked until you learn to follow packets and code trails. |
Author: | JohnY [ Sun Jul 29, 2007 12:35 am ] |
Post subject: | Re: Runtime 6 - Overflow ? |
Lol, u guys kinda helped me understand a new part of VB6. Although I'm pretty new to VB6, I have lots of experience in coding in Java, wich isn't lots of different from VB6. Although I didn't realise that this Overflow error had to do anything with my inventory slots increasing my max slots, I made 32 of these while my max was set to 24. Thank you both for helping me out. |
Author: | Robin [ Sun Jul 29, 2007 12:18 pm ] |
Post subject: | Re: Runtime 6 - Overflow ? |
Now problem, but tbh most languages are alike in the way they are executed. Once you know one, it's usually easier to learn another. Glad to have helped ;D |
Page 1 of 4 | All times are UTC |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |