123
-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|604|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
Socoder -> Blitz Max -> Compile error

Wed, 09 Jun 2010, 17:08
lijap
I am making an rock paper scissors game (my firsy program on my own)
I get an error that says "missing function parameter 'x'."
The code is:


If you find any other errors please include them.
Thanks in advance.
Wed, 09 Jun 2010, 17:12
mole
YOu have a number of If statements e.g:


Should it not be y=y+1 (and x=x+1 in some of the others)?

I haven't done any programming for years, so I dunno if I'm completely wrong, but that is the first thing that comes to me.
Wed, 09 Jun 2010, 17:16
lijap
I will try it out, but I have to go to dinner first. I think you are right though. thanks
Wed, 09 Jun 2010, 17:21
lijap
I managed to do it before dinner, I still get the error however I fixed those. i now highlighted the problem line. Thanks for mentioning that though.
Wed, 09 Jun 2010, 17:22
Jayenkai
Yeah, that seems to be the problem, you've done it a few times, too, with x+1's and y+1's.

X=X+1 is equivalent to "Make X be X + 1"

Whereas X+1 is just a number!

-=-=-
''Load, Next List!''
Wed, 09 Jun 2010, 17:24
Jayenkai
Ah, sorry.. Highlighting doesn't work in code boxes (so you can show off bbcode inside code boxes!!) my fault!

.. Um, the issue then is that there's no comma after the text, so it's finding a random number where there should be a ", X, Y" if that makes sense.

-=-=-
''Load, Next List!''
Wed, 09 Jun 2010, 19:48
lijap
Thank you very much!
Wed, 09 Jun 2010, 21:50
JL235
When starting out a good habit you might want to consider getting into is indenting your code. It typically makes your code easier to read and follow.

For example here is your code from above indented and with a few extra line breaks.

Thu, 10 Jun 2010, 04:12
steve_ancell
JL235 When starting out a good habit you might want to consider getting into is indenting your code. It typically makes your code easier to read and follow.

That's right Joe, you tell 'em
Thu, 10 Jun 2010, 04:36
steve_ancell
In addition to all other errors that anyone else has found, I have noticed you are not calling your DrawText function properly. You've been forgetting to put a comma after the quotes and you need to comment-out anything that's not a command.

DrawText "1 for rock, 2 for paper, and 3 for scissors"0,0 'This one^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

should be:

DrawText "1 for rock, 2 for paper, and 3 for scissors", 0,0 ;This one^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

And

'_________________done______________________________

should be

;_________________done______________________________
Thu, 10 Jun 2010, 04:38
Jayenkai
BlitzMax, Steve.. It's 's in BlitzMax
Thu, 10 Jun 2010, 04:47
steve_ancell
Oh, cheers for pointing that out Jay.

*Gets dead fish and slaps self with it*
Fri, 11 Jun 2010, 08:51
lijap
Thanks everyone for the help!