Code center > Darwinbots Program Source Code
The shots erray is locked temporarly
Botsareus:
Num, when it goes to makepuff it calls on createshot and then it does redim the shots array...
If you have With array anywere and even through a stack of nested calls you try to redim that array , that "with" statement will keep it locked.
I just tryed it without the "with" in the "updateshots" , it worked fine.
Numsgil:
--- Quote ---If you have With array anywere and even through a stack of nested calls you try to redim that array , that "with" statement will keep it locked.
I just tryed it without the "with" in the "updateshots" , it worked fine.
--- End quote ---
Are you sure, or are you assuming? Did it actually trip an error? Since we're not passing an array element to makepoff, I don't think it will cause any problems.
Botsareus:
LOL < NO SHIT IT ACTUALY TRIPED THE ERROR I NEVER "ASSUME" STUFF LIKE THIS.
and without that "with" statement the error was gone!
Numsgil:
--- Code: ---Private Sub takepoison(n As Integer, t As Integer)
If Shots(t).FromSpecie = rob(n).fname Then 'Robot is imune to poison from his own species
rob(n).poison = rob(n).poison + Shots(t).value 'Robot absorbs poison fired by conspecs
If rob(n).poison > 32000 Then rob(n).poison = 32000
rob(n).mem(827) = rob(n).poison
Else
Dim power As Long
power = Shots(t).nrg / Shots(t).range * Shots(t).value
rob(n).Poisoned = True
rob(n).Poisoncount = rob(n).Poisoncount + power
If rob(n).Poisoncount > 32000 Then rob(n).Poisoncount = 32000
If Shots(t).Memloc > 0 Then
rob(n).Ploc = Shots(t).Memloc
Else
rob(n).Ploc = Int(Rnd * 1000) + 1
End If
End If
Shots(t).Exist = False
End Sub
--- End code ---
I don't see a killrobot. DId you add that to your source?
Navigation
[0] Message Index
[*] Previous page
Go to full version