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 / Global command and function bug

Author
Message
MrTAToad
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 23rd Mar 2003 12:53 Edited at: 23rd Mar 2003 13:03
With the following code :



You will find that the d parameter is passed incorrectly incorrectly (7,7,23) instead of 7,1,23. It seems the ptr value overwrites d...

You can get around this by defining ptr as local (ptr as DWORD). However, this doesn't work if you want to return a value from a function and modify the global variable.

Good news everyone! I really am THAT good...
http://www.nickk.nildram.co.uk/ for great plug-ins - oh my, yes!

Login to post a reply

Server time is: 2026-07-11 08:46:46
Your offset time is: 2026-07-11 08:46:46