Ok. I'm stupid but I still need "EXPERTS" help.
Author |
Message |
sixjuwel
|
|
|
|
|
Sponsor Sponsor
|
|
|
McKenzie
|
Posted: Wed Dec 29, 2004 9:42 am Post subject: (No subject) |
|
|
I'd love to help but you have gone out of your way to make your code hard to read. One of the points that your teacher should have told you when teaching proper coding style is that if you use horrible style no one will want to look at your code. Come on
Quote: code: | procedure fool
...
procedure stupid
...
procedure what
...
|
and the only comments you have are all but useless
|
|
|
|
|
|
sixjuwel
|
Posted: Wed Dec 29, 2004 1:42 pm Post subject: oh... sorry |
|
|
so sorry haha
humn....
first
fool - it's box when the animation finished
(ai,mega,whwh) are same thing
stupid- this is simulation for AND GATE
(what, which, how) are same
I think those are ..... things...
plz help me...
|
|
|
|
|
|
McKenzie
|
Posted: Thu Dec 30, 2004 10:28 am Post subject: (No subject) |
|
|
Those are just some of the examples of poor name choices.
code: | var k, e, r, a, m, q : int
var it1 : int
var it2 : int
var it3 : int
var it4 : int
|
I could find loads of others.
I've done something similar before. You start working on a program and as a way of saying "ha, I'm so good that I don't need proper variable names or comments. Stupid teacher." you go out of your way to use poor style. The problem is the code becomes painfull to look at. You need to go through add comments and change most of your variable and subroutine names, heck even the name of the program. If you do that, repost the new version and I'll look at it.
|
|
|
|
|
|
McKenzie
|
Posted: Thu Dec 30, 2004 10:56 am Post subject: (No subject) |
|
|
OK, despite the heartfelt lecture I took a closer look at your code. On top of poor naming and poor comments you also have a a resource leak. The resource leak is not the reason your program doesn't work but it's related. In sidebutton/sidebutton1 you keep making new buttons, but you never dispose of them. Whichever Start button you make first will always be on top and the only one you can click on. Two ways to fix this.
1. Dispose of your old buttons before making new ones.
2. Make all of your buttons globaly and use GUI.Show/GUI.Hide to control them
|
|
|
|
|
|
|
|