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 / Compiler/Editor bugs (not reffering to patch 4)

Author
Message
Viktor
23
Years of Service
User Offline
Joined: 7th Oct 2002
Location: Austria
Posted: 25th Mar 2003 18:18
Return without a previous gosub act as END, please make error message "RETURN without GOSUB"
Two labels with same name do not cause a error, please make errror message "Double label definition". Only the second label is executed, this makes me mad if I forget to remove dummy labels before.
FOR without NEXT causes error "can not close nest at line (last line of program)", this is because NEXT ignores any variable name (NEXT a is the same as only NEXT). Do not ignore variable names, so the compilen will be able to say which nest (line, with FOR command highlighted, and name of variable displayed) was not closed.
PC: AMD 1200/512 Mb SDR/GF2MX Dual Display/Win2000, 19" Monitor
ZX: Spectrum 128+ Customized version.
Current Project: BMP2SCR Pro (with LDIR)
MrTAToad
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 25th Mar 2003 19:38
Heres a good one for you :



What should the text statement display ? It should be 7,1,23 - but it 'aint...

Good news everyone! I really am THAT good...
http://www.nickk.nildram.co.uk/ for great plug-ins - oh my, yes!
Galiem
23
Years of Service
User Offline
Joined: 27th Nov 2002
Location: United States
Posted: 26th Mar 2003 17:32
Try copying from bitmap 0 to another, so that you can refresh only part of the screen.

COmpiler will crash every time.

haggisman
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 26th Mar 2003 17:44
Unless i missed something both this:-



and



work, were you pointing out something else?

Specs:- 1GHZ athlon, Radeon8500, 192mb ram, winxp
MrTAToad
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 26th Mar 2003 18:31 Edited at: 26th Mar 2003 18:46
On my machines 7,7,23 is printed, instead of 7,1,23 - which did you get ?
The problem is that passing the global value like that seems to corrupt the next variable (which is rather naughty).

Good news everyone! I really am THAT good...
http://www.nickk.nildram.co.uk/ for great plug-ins - oh my, yes!
haggisman
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 26th Mar 2003 18:45
im getting 7,1,23 here...

Specs:- 1GHZ athlon, Radeon8500, 192mb ram, winxp
MrTAToad
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 26th Mar 2003 18:47 Edited at: 26th Mar 2003 18:47
Whats the size of your core.dll (I'm assuming that is where the problem is) ? And are you using Patch 4?

Good news everyone! I really am THAT good...
http://www.nickk.nildram.co.uk/ for great plug-ins - oh my, yes!
haggisman
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 26th Mar 2003 18:50
Im using Patch 4 and the core.dll is 108KB.

Specs:- 1GHZ athlon, Radeon8500, 192mb ram, winxp
MrTAToad
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 26th Mar 2003 18:55 Edited at: 26th Mar 2003 19:39
In your programs, you've got rid of the global command - which is an important part of the error...

Good news everyone! I really am THAT good...
http://www.nickk.nildram.co.uk/ for great plug-ins - oh my, yes!
Viktor
23
Years of Service
User Offline
Joined: 7th Oct 2002
Location: Austria
Posted: 27th Mar 2003 02:20
Hmmm, Lee still not fixed the nice crash at copying bitmap 0 to another one? Thank god we rewrote the code (in Patch 1 era) to not trying to copy from Bitmap 0. But GET IMAGE and PASTE it in another bitmap is slower. I wonder it this bug will be fixed in Patch 255.

PC: AMD 1200/512 Mb SDR/GF2MX Dual Display/Win2000, 19" Monitor
ZX: Spectrum 128+ Customized version.
Current Project: BMP2SCR Pro (with LDIR)
Shadow Robert
23
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 27th Mar 2003 04:12
why not simply create 2 bitmaps and then use a memblock to pass the data across ... as long as the resource for the second bitmap is there (no matter the space/size allocated) you can then copy the memblock directly do it as a memory copy rather than a function


ptr as DWORD
*ptr=7
test(1,23)
wait key

function test(d as DWORD,dx as DWORD)
text 0,0,str$(*ptr)+" "+str$(d)+" "+str$(dx)
endfunction


that should also return the same value (^_^) - not global involved

Tsu'va Oni Ni Jyuuko Fiori Sei Tau!
One block follows the suit ... the whole suit of blocks is the path ... what have you found?
CloseToPerfect
23
Years of Service
User Offline
Joined: 20th Dec 2002
Location: United States
Posted: 27th Mar 2003 04:20
global ptr as DWORD
ptr=7
test(ptr,1,23)
wait key

function test(ptr as DWORD,d as DWORD,dx as DWORD)
text 0,0,str$(ptr)+" "+str$(d)+" "+str$(dx)
endfunction

damn I get 7,7,1 figure that out?

Galiem
23
Years of Service
User Offline
Joined: 27th Nov 2002
Location: United States
Posted: 27th Mar 2003 05:03
Nice! I didn't even think of that Raven 8) Thank you kindly 8)

Shadow Robert
23
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 27th Mar 2003 10:35
it's bloody late i ain't wrapping my brain around that... and anytime i can push more people to use the advanced features of pro - i will (yw)

Tsu'va Oni Ni Jyuuko Fiori Sei Tau!
One block follows the suit ... the whole suit of blocks is the path ... what have you found?
MrTAToad
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 27th Mar 2003 10:58
Yes, I've e-mailed Lee about the 7,7,23 problem a while ago...

Good news everyone! I really am THAT good...
http://www.nickk.nildram.co.uk/ for great plug-ins - oh my, yes!
MrTAToad
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 27th Mar 2003 11:00
Raven - you've assigned 7 to *ptr without defining a memory location - that could cause a nasty crash...

Good news everyone! I really am THAT good...
http://www.nickk.nildram.co.uk/ for great plug-ins - oh my, yes!
Viktor
23
Years of Service
User Offline
Joined: 7th Oct 2002
Location: Austria
Posted: 30th Mar 2003 17:45
@Raven: It is a workaround that works, but this does not change the fact that COPY BITMAP has a bug We have found out some workarounds ourself, so we draw on Bitmap 1, then copy the content to any other Bitmap we want. But why Lee still did not fix this bug, that is known since the beginning of DB Pro existence, this is the question.

PC: AMD 1200/512 Mb SDR/GF2MX Dual Display/Win2000, 19" Monitor
ZX: Spectrum 128+ Customized version.
Current Project: BMP2SCR Pro (with LDIR)
Rob K
Retired Moderator
23
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 30th Mar 2003 17:47
"it's bloody late i ain't wrapping my brain around that... and anytime i can push more people to use the advanced features of pro - i will (yw)"

Raven, DBPro is meant to make games progamming easy, lengthy workarounds like the one you suggested shouldn't be necessary. I want to use memblocks on my terms, not when DBS produce buggy DLLs.

Current Project: Retro Compo. Entry.

Login to post a reply

Server time is: 2026-07-21 20:34:37
Your offset time is: 2026-07-21 20:34:37