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 / Differing values for very similar functions

Author
Message
Dar13
18
Years of Service
User Offline
Joined: 12th May 2008
Location: Microsoft VisualStudio 2010 Professional
Posted: 28th Nov 2010 23:11 Edited at: 28th Nov 2010 23:14
Hey everybody, I've been fighting with this bug for almost a full day now. I've got these two functions
and
.

Although they are very similar in both structure and usage, I'm getting radically different results. I can't explain the bug in words really, so I've uploaded a zip of my project. To reproduce the bug, left-click on the blue rectangular building to the right of the screen and then left-click the flag looking button on the GUI bar along the bottom of the screen. Then right-click somewhere near where you'd want a unit to run to when spawned. The red sphere should be where you click, but it isn't.

If anyone can help I'd greatly appreciate it.

EDIT: To see the difference, select one of the blue boxes like in AoE and right-click to move it.

EDIT2: Forgot some things in the zip.


Jimpo
21
Years of Service
User Offline
Joined: 9th Apr 2005
Location:
Posted: 28th Nov 2010 23:36
Just from a quick glance, this should probably be mouse_x. From the second function:
null=pick object(mouse_y,mouse_y,groundObjID,groundObjID)

Dar13
18
Years of Service
User Offline
Joined: 12th May 2008
Location: Microsoft VisualStudio 2010 Professional
Posted: 28th Nov 2010 23:39
Thanks Jimpo, I feel pretty stupid right now.
Can't believe I missed that.


Login to post a reply

Server time is: 2026-07-21 13:38:35
Your offset time is: 2026-07-21 13:38:35