My code seems to be a little wonky, I'm only a novice coder, do any of you know how to get the step_rand() proc working using pixel movement, if this is indeed the problem? If you can provide me with an easy to use alternative proc, I'd be just as pleased. Thankee for your time and consideration, you didn't have to click on this post, cheers.
| |
the indentation will appear wrong in this message, but I am pretty sure that I have no problem with that. | ||
Bumblemore wrote:
... Hi Bumblemore, welcome to the forums! When posting code, you can surround your code with the <dm> and </dm> tags to preserve the whitespace and add syntax highlighting. So for example: <dm> // You code here! </dm> Becomes:
Now for your specific problem, the issue is the argument you're passing to rnd(): src. What you're actually doing is covering the existing definition for the src variable with a new local variable that is also called src. Because you never assigned a value to it, it's null, and subsequently you are passing null to step_rand(). The solution is simple: remove the variable "src" from your arguments! :) | ||
#4 Mar 5 2012, 11:13 am
|
|
Tut, silly me.
| |
I just tried out using the step_rand() proc, and it seemed to work OK (I think, I'm not a very impressive programmer myself). Could you post a snippet of the code that gives you troubles, along with what your using for the step_size procs, icon_size, and fps?