Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / sprite breakout game help DBC

Author
Message
Coder#05
18
Years of Service
User Offline
Joined: 26th Oct 2005
Location: Denmark
Posted: 24th Jan 2006 00:43
Hey everyone
Why do i get this error: you can only increment variables.
runing this program?
it runs fine for a while, but then that error sows up
And can some one sow me some examples on how to animate a sprite?
or maby link me to some tuts on the subject? i tryed searching the forums but dident find anything on it. hmmm
and i would also be thank full for some suggestions on how to make better ball/bat conditions
here is the code, media included in download


well goodnight from denmark
hope some one can help me out a bit.

Not that much a noob, but still a noob

Attachments

Login to view attachments
hyrichter
20
Years of Service
User Offline
Joined: 15th Feb 2004
Location: Arizona
Posted: 24th Jan 2006 04:50
I think it's this line right here:
if bspeedx(ball)<-10 then inc bspeedx(ball)= -10

In DBC, you cannot use the inc or dec commands on arrays. So you would have to do something like this:


I hope that fixes your problem.

Coder#05
18
Years of Service
User Offline
Joined: 26th Oct 2005
Location: Denmark
Posted: 26th Jan 2006 17:26
Thanks yup that surted out my problem
But could still be nice to take a look on some other code that does the same only written in, maby a smarter/more acurate way? (ball)

Not that much a noob, but still a noob

Login to post a reply

Server time is: 2024-09-24 15:34:06
Your offset time is: 2024-09-24 15:34:06