Code center > Bug reports
Incompatible bots
Botsareus:
G dam it, I f up on my "tie to parent on vision disabled" code
--- Code: --- ElseIf .lastopp = 0 And Not SimOpts.DisableTies And (.age < 2) Then 'Botsareus 6/12/2012 Added code so blind robots can tie to parent
maketie n, rob(n).parent, rob(n).radius + rob(rob(n).lastopp).radius + RobSize * 2, -20, rob(n).mem(mtie)
End If
--- End code ---
It is saying parent out of range
Botsareus:
el fixo:
--- Code: --- ElseIf .lastopp = 0 And Not SimOpts.DisableTies And (.age < 2) And rob(n).parent <= UBound(rob) Then 'Botsareus 6/12/2012 Added code so blind robots can tie to parent Botsareus 8/25/2012 a bug fix not to search for parent if out of range
If rob(rob(n).parent).exist Then 'Botsareus 8/25/2012 make sure parent exsists
maketie n, rob(n).parent, rob(n).radius + rob(rob(n).lastopp).radius + RobSize * 2, -20, rob(n).mem(mtie)
End If
--- End code ---
attached is the fix for the error, see how it works for you.
edit: I will probably have to redo the code again to calculate tie distance because apparently mother is can die in one cycle
Testlund:
Alright, I'll try this one on both my Win 7 and XP machine. It may take anything from 5 minutes to several ours before a crash occurs. I'll upload a new save if it happens.
Navigation
[0] Message Index
[*] Previous page
Go to full version