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.

DarkBASIC Professional Discussion / sprite wont move right???

Author
Message
Beyond the Humans Knowledge
15
Years of Service
User Offline
Joined: 27th Oct 2010
Location:
Posted: 16th Jun 2011 23:36
This is frustrating me alot. I dont know why the sprite wont move right?? What is wrong with this code?



onhcet d(-_-)b techno
Lucas Tiridath
AGK Developer
17
Years of Service
User Offline
Joined: 28th Sep 2008
Location: Kings Langley, UK
Posted: 17th Jun 2011 00:10
Problem is that your only updating the variables and not the position of the sprite. Put the

sprite 1,xx,yy,1

in the do ... loop.

Hope that helps.
Beyond the Humans Knowledge
15
Years of Service
User Offline
Joined: 27th Oct 2010
Location:
Posted: 17th Jun 2011 00:52
great awesome! but now, it slides and im wanting it to move as if its snapping to a grid.

onhcet d(-_-)b techno
Grog Grueslayer
Valued Member
21
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 17th Jun 2011 05:45 Edited at: 17th Jun 2011 05:48
It may be going so fast it appears to slide. You can create a timer to slow down the action. With the TIMER() command 1000 equals 1 second.



Also I noticed you were wanting to increase by 52.1. The variable xx is an integer that only holds whole numbers so it's best to only increase by 52.

Beyond the Humans Knowledge
15
Years of Service
User Offline
Joined: 27th Oct 2010
Location:
Posted: 17th Jun 2011 09:02
it gives an error when executed "could not determine parameter type of '()gt' at line 38"??

onhcet d(-_-)b techno
Grog Grueslayer
Valued Member
21
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 17th Jun 2011 09:56
An error in my code? There aren't any errors when I run it. Are you updated all the way?

http://www.thegamecreators.com/?m=view_product&id=2000&page=upgrade7-61

Beyond the Humans Knowledge
15
Years of Service
User Offline
Joined: 27th Oct 2010
Location:
Posted: 18th Jun 2011 00:27
ok, the thing is, i have dark basic pro installed on my desktop computer with windows xp and i use my laptop like now for internet because i dont have internet on the other pc. i generally use internet sharing, but for some reason, the internet is not working on my desktop. so in order to actually try out the executable, i have to get a free order key which i cant get because im not connected to the internet right now. i did update though, but i will post back to this as soon as i get the internet fixed

onhcet d(-_-)b techno
Beyond the Humans Knowledge
15
Years of Service
User Offline
Joined: 27th Oct 2010
Location:
Posted: 18th Jun 2011 02:10
ok, got the internet fixed and dbp updated, but still get the same error??

onhcet d(-_-)b techno
Grog Grueslayer
Valued Member
21
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 18th Jun 2011 02:42
That's weird. Did you copy and paste it exactly or write it in yourself?

Try running the compiled code (attached .exe).

Beyond the Humans Knowledge
15
Years of Service
User Offline
Joined: 27th Oct 2010
Location:
Posted: 18th Jun 2011 04:36
XD haha, the reason i got that error was because i copied it from gmail and not the code snip-it. it replace the "<" symbols with the "gt" for some reason?? but yeah, i got it now. sorry i made you go through the trouble and your exe did work btw. thanks for the help and the update!

onhcet d(-_-)b techno
Grog Grueslayer
Valued Member
21
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 18th Jun 2011 04:44
Np... it's worth the effort to help you. I'm glad you got it working.

Login to post a reply

Server time is: 2026-07-11 02:14:08
Your offset time is: 2026-07-11 02:14:08