Darwinbots Forum
Code center => Bugs and fixes => Bug reports => Topic started by: Jez on December 31, 2006, 07:48:41 AM
-
Here's one I caught though, error 76 subscripts out of range IIRC
Was just rerunning the league and clicking the win button to see how easy it was to get the competitors to disapear again
HDRoutines (Code)
-> Open path For Binary As 1
Put #1, , numOfExistingBots
For t = 1 To MaxRobs
If rob(t).exist Then
-
File zipped, sry didn't think about it.
You'd probably have better luck just re-running the league under debugger and clicking win repeatedly, error sims for leagues don't hold the relevant league info. Only took me a couple of minutes to reproduce.
Anyway, am having go at hovering mouse stunt:
t = 0
Put #1, , Len(SimOpts.AutoRobPath) =""
Put #1, , SimOpts.AutoRobPath =""
Put #1, , SimOpts.AutoRobTime =0
Put #1, , Len(SimOpts.AutoSimPath) =""
Put #1, , SimOpts.AutoSimPath =""
Put #1, , SimOpts.AutoSimTime =0
Put #1, , SimOpts.BlockedVegs =FALSE
Put #1, , SimOpts.Costs(SHOTCOST) =23
Put #1, , SimOpts.CostExecCond =0.004
Hmm, there are lots of these, oops, it didn't want to give me these at first but I think these are the ones you were talking about:
Num of existing bots =15
MaxRobs =16
How do you decide what is relevant? Is it just the next few values after highlighted line?
-
Normal stuff, running DB F1 rerun under debugger
Error. Subscript out of range. Saving sim…
Spanish C v Darth shimazu. Strange as showed 22 matches as having been played. 1st position empty and neither of the bots showing in the league table.
(Darth shimazu started in position 8 and Spanish C position 9 in the leaguetable.txt file I was using so I guess the rest of the results are wrong)
Run time error 76 path not found
HDRoutines (code)
Public Sub SaveSimulation(path As String) *(path =\source-r\saves\error.sim) should this be ‘’d as well?*
Dim t(*0) As Integer
Dim X(*52) As Integer
Dim j(*0) As Long
Dim s2(*“”) As String
Dim temp(*“”) As String
Dim numOfExistingBots(*50) As Integer
Form1.MousePointer(*11) = vbHourglass(*11)
numOfExistingBots(*50) = 0
For X(*53) = 1 To MaxRobs(*52)
If rob(X)(*53).exist *(rob(X)exist = false)* Then numOfExistingBots(*50)= numOfExistingBots(*50) + 1
Next X(*53)
-> Open path For Binary As 1 **(I am starting to dislike this line )**
Put #1, , numOfExistingBots(*50)
For t(*0) = 1 To MaxRobs(*52)
If rob(t(*0)).exist *(rob(t)=false)* Then
SaveRobotBody 1, t(*0)
(end if)
For those that wish to see the results as it stood when I discovered this error;[1] no text
[2]Animal S
[3]Callidus
[4]DIN2
[5]Duplo S
[6]HDV4
[7]James
[8]Virilus D
[9]Virilus S
[10]Vex P
[11]Devincio E
[12]D Scarab
[13]Devincio D
[14] Queen J
[15]Scratch DJ
[16]Vector
[17]Vex
[18]Umbra D
[19]Anon T
[20]Hunter
[21]Shimazu
[22]I. Venia[/li]
I have noticed Uno 3.0 is also missing from list, not checked the rest.
If there is anything I can do to make my annotations to the code clearer Eric then please say, I know there are conventions for adding stuff to code that I am not aware of.
Fingers crossed that this is the bug we were searching for, I don’t have internet access atm to check, if not then there is no point me using the league reruns to find it. If this is the ‘clicking win button’ error (I didn’t use the win button but it has returned from its own accord once before without using that button) then I hope you will consider fixing this first so I can help find the overflow bug.
I have never got the overflow bug using VB and never got this bug without using VB btw
Best regards and wishing you all a happy new year.
Jez
-
I have a hunch about this one. Are you using autosave when running leagues?
-
Just checked and the answer is no.
EDIT
In reply to myself about the missing bots in that list, I.venia is the last of the entries, there are 8 bots missing.