Code center > Bugs and fixes
Let's make a stable platform
PurpleYouko:
That kind of thing makes code almost impossible to debug.
You have to spend ages going through and reformatting things before you can even look at the code itself.
I have debugged other peoples code for them from time to time and invariably, bad formatting is the primary cause for the bug in the first place.
Here is an example of some code that I am fixing for some guy from Mr. Excel
Just check out the crappy formatting. :blink:
--- Code: ---Private Sub CommandButton1_Click() 'Enter Button
'Error messages that show if TextBox not filled in
Dim ws As Worksheet
Dim WSQC As Worksheet
Set ws = Sheets("Time Sheet Compile")
Set WSQC = Sheets("Quality Control Checks")
If TextBox4 = "" Then
MsgBox (" You Have Not Entered The Order Number In The Box Supplied")
Order_Details.Hide
Order_Details.Show
Else
If TextBox5 = "" Then
MsgBox (" You Have Not Entered Your Name In The Box Supplied")
Order_Details.Hide
Order_Details.Show
Else
If ComboBox1 = "" Then
MsgBox (" You Have Not Entered The Shift Details In The Box Supplied")
Order_Details.Hide
Order_Details.Show
Else
If ComboBox2 = "" Then
MsgBox (" You Have Not Entered The Machine Details In The Box Supplied")
Order_Details.Hide
Order_Details.Show
Else
Confirm_Details.Show
End If
End If
End If
End If
With ws
ws.Range("A6") = Me.Textbox3.text 'Date
ws.Range("B6") = Me.TextBox4.text 'Order Number
ws.Range("C6") = Me.ComboBox1.text 'Shift
ws.Range("D6") = Me.ComboBox2.text 'Machine
ws.Range("E6") = Me.TextBox5.text 'Operators Name
'Copy to Quality Control Checks Sheet
WSQC.Range("B2") = Me.Textbox3.text 'date
WSQC.Range("B5") = Me.TextBox4.text 'Order Number
WSQC.Range("B3") = Me.ComboBox1.text 'Shift
WSQC.Range("B6") = Me.ComboBox2.text 'Machine
WSQC.Range("B4") = Me.TextBox5.text 'Operators Name
WSQC.Range("C11") = Sheets("Time Sheet Archive").Range("AQ6") 'Previous Order Number
WSQC.Range("D11") = Sheets("Time Sheet Archive").Range("BB6") 'Previous Order's Colour Code
Me.Hide
QC_Check.Show
End With
End Sub
--- End code ---
Numsgil:
:o
Bots, that would be the exact opposite problem you have ;)
Numsgil:
The 60 maxvelocity is a physical limitation of the visual basic program.
Ideally there'd be no max velocity. But the physics engine isn't built to cope with that (yet). Bots would fly right through each other during a cycle without colliding when they should have.
I've raised it to 180 in my code at home to see how stable it is. Alot of collisions are being missed.
Higher than 180 and you'll get a spate of overflow errors you'd need to fix.
And now you know why I work on the physics engine ;)
Testlund:
Ran a simulation wich lasted for only 5 minutes and then it crashed.
Run-time error 9: Subscript out of range.
Code:
While Not (DNA(k).tipo = 4 And DNA(k).value = 4) And Not (DNA(k).tipo = tipo And DNA(k).value = value)
Line 108.
It's the code in the mutations window.
Numsgil:
That means a bit of DNA wasn't ending with "end" like it should I think. tipo = 4 and value = 4 is the old code for "end".
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version