Computer Science Canada variable has no value :( |
Author: | Clayton [ Wed Jun 07, 2006 11:28 am ] | ||
Post subject: | variable has no value :( | ||
hey, im working on a game right now and ive come upon a little "snag", you see whenever my game calls the DrawLine procedure from within the Ball module, the Draw.ThickLine command is highlighted and the error "variable has no value" occurs, anybody have any idea why this might be? (i think it might be the array being passed to the procedure..but i dont see what that has to do with it) any help would be appreciated ![]()
|
Author: | Delos [ Wed Jun 07, 2006 12:38 pm ] | ||
Post subject: | |||
What about when b != 1? What happens then? Right now, LineArray will be uninitialized unless the mouse button is held down. Some other comments (to work on once you have things working): - you've used types for your lines, use them for the ball as well. Compartmentalization is good. - your Initialize proc should take more values than that! You have too many hard-coded values. - I would also suggest changing Init from a proc to a fcn. Much, much cleaner. - I haven't run this yet, so I don't know if there are any potential hiccups from having those two loops... - I don't particularly like the idea that the module changes the settings of the window. Nor do I like that it has any extraneous code...you should look into that. |
Author: | Clayton [ Wed Jun 07, 2006 12:59 pm ] |
Post subject: | |
its only a chunk of code that i took from what i have, its not the whole thing, i just gave you what was needed to run, i dont know why theres a View.Set in there ![]() ![]() |