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 Discussion / what`s wrong with this code?

Author
Message
simonuk74
21
Years of Service
User Offline
Joined: 3rd Nov 2002
Location:
Posted: 14th Dec 2002 23:36
I have a funny problem with my snippet ( for getting mouse values ), that the screen stays blank, but if I remove the CLS from within the loop, I can see what is being printed, but every cycle of the loop, it over-writes, and soon becomes messy.
Something wrong with the CLS/SYNC commands, but it has happened in other codes I have done, but it DID work, until recently, and I havent changed it. I just loaded the code to look at the mouse readings.



simon.
Easily Confused
21
Years of Service
User Offline
Joined: 22nd Oct 2002
Location: U.K. Earth. (turn right at Venus)
Posted: 15th Dec 2002 00:26
Your code works alright here.

Using DBPro I cannot tell you if there is an issue with the cls/sync commands in your version of DarkBasic, however, have you considered Set Text Opaque instead of cls?



"Earth is the cradle of humanity,
but one cannot live in a cradle forever"
Konstantin E. Tsiolkovsky (1911)
John H
Retired Moderator
21
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Burlington, VT
Posted: 15th Dec 2002 00:43
I use If keystate(28) (for enter) = 1 then print bla bla

if keystate(28)=0 then cls

Current - RPG: Eternal Destiny : Help Wanted!
Upcoming- MMOFPS- Paintball Game: HELP WANTED!
Http://halbrosproductions.netfirms.com
simonuk74
21
Years of Service
User Offline
Joined: 3rd Nov 2002
Location:
Posted: 15th Dec 2002 01:03
yours works great here , apart from on my DB, opaque text wont clear the `0` from 1 through to 9, so after scrolling around the numbers , 1 to 9 print 10 to 90 ( inc of 10 )

I have been able to rectify that by : text x,y,string+" "
so the spaces overwrite the `0`, no probs.
but its worrying that I have done as the code I posted for a long while, and now it wont work lol

the other prob that suddenly has happened is I have written a simple `windows explorer` kinda thing, for use in selecting a file to load/save in the database I`m writting ( i`ve not checked that yet - I hope that still works! )
For some reason, its gone really slow, depending on how much its printing on the screen.

the only thing I have changed is the Video drivers for my GFX card, do you think this would make difference ?

simon

simonuk74
21
Years of Service
User Offline
Joined: 3rd Nov 2002
Location:
Posted: 15th Dec 2002 01:13
RPG, I tried the keystate code, but the screen stays blank when I`m not using the keyboard, and the program I`m doing is mouse controlled! lol

works ok tho, but I`m not sure if it my PC, I did this :-



then you can see it working while up/down is pressed, but the screen clears when I dont press anything, I can see why that is so, but I need it to be displayed at all times.

simon

Easily Confused
21
Years of Service
User Offline
Joined: 22nd Oct 2002
Location: U.K. Earth. (turn right at Venus)
Posted: 15th Dec 2002 01:20
hmmmm!, If these problems have appeared right after installing new drivers then this is a possibilty, all I can suggest at this point, is to run any test programs you created before (preferably graphical ones) and see if you can spot the difference.

"Earth is the cradle of humanity,
but one cannot live in a cradle forever"
Konstantin E. Tsiolkovsky (1911)
simonuk74
21
Years of Service
User Offline
Joined: 3rd Nov 2002
Location:
Posted: 15th Dec 2002 02:06
well there is no difference in the codes themselves, as far as CLS/SYNC is concerned., but I wrote most of the codes BEFORE I installed new drivers.
I have just removed those drivers, and now I`m gonna test some stuff in DB, brb

simon

simonuk74
21
Years of Service
User Offline
Joined: 3rd Nov 2002
Location:
Posted: 15th Dec 2002 02:08
Hmm, no difference, still no good on sync, also still a little slower, I gonna re-install DB & DirectX, see what happens then.

see ya soon

simon

simonuk74
21
Years of Service
User Offline
Joined: 3rd Nov 2002
Location:
Posted: 15th Dec 2002 05:34
still no change, seems theres nothing I can do ?
I have massive slow-down in most of my DB code now, where I didnt have before.....

oh well

simon

Login to post a reply

Server time is: 2024-04-25 09:43:25
Your offset time is: 2024-04-25 09:43:25