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 / sync and print problem

Author
Message
Area 51
19
Years of Service
User Offline
Joined: 3rd Feb 2006
Location: UNKNOWN
Posted: 23rd Dec 2007 01:07
Hey guys,

Im having an issue with this code in DBC:


It should make words appear, but it just shows blank. It's worked for me before, but now it doesn't.

Are we alone?
Ortu
DBPro Master
17
Years of Service
User Offline
Joined: 21st Nov 2007
Location: Austin, TX
Posted: 23rd Dec 2007 01:46
the clear screen 'cls' is removing the words as soon as they are printed. if you drop that, the print will show

Libervurto
18
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 23rd Dec 2007 01:48
That's very strange, I can't think of any reason why it wouldn't work.
You haven't set the ink to black or something like that?
If you've run this exact code and nothing happens I am very confused.

Area 51
19
Years of Service
User Offline
Joined: 3rd Feb 2006
Location: UNKNOWN
Posted: 23rd Dec 2007 02:24
I ran that exact code, word for word, and nothing happened.

Are we alone?
Benjamin
22
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 23rd Dec 2007 02:26
Works fine for me.

Tempest (DBP/DBCe)
Multisync V1 (DBP/DBCe)
Libervurto
18
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 23rd Dec 2007 14:04
Quote: "the clear screen 'cls' is removing the words as soon as they are printed. if you drop that, the print will show"

the print comes after the cls

Yodaman Jer
User Banned
Posted: 24th Dec 2007 01:14
Interesting, because their appears to be nothing wrong . . .
Then again I am not an expert programmer, but I know what those commands do . . .
I say just try the following:


I think that would work, but if not, try this:


If that doesn't work, I don't what's wrong!

Wii came . . . Wii saw . . . Wii conquered!
TheComet
17
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 31st Dec 2007 23:00
I think I know what`s wrong. If you use "print", it will print the word under the last word every loop, and using the "cls" command, you clear what has been written. So try this:



you have to turn the backdrop on and every loop you have to set the cursor so it prints at the same place. Or do it the easy way:



Oooooops!!! I accidentally formated drive c.
Pixelator
17
Years of Service
User Offline
Joined: 8th Jul 2007
Location: here
Posted: 1st Jan 2008 17:44
@ area 51

i looked at your code just now and realised that the same thing could be done like this:



Maryville Game Developers
Visit our website at http://www.freewebs.com/maryville-game-developers/index.htm
Pixelator
17
Years of Service
User Offline
Joined: 8th Jul 2007
Location: here
Posted: 1st Jan 2008 21:25
Quote: "I think the question was why it doesn't work, not how to show "Hello" on the screen. "


no comment


Maryville Game Developers
Visit our website at http://www.freewebs.com/maryville-game-developers/index.htm
TDK
Retired Moderator
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 1st Jan 2008 22:39
The code snippet works as it should do in DBC V1.2 - fine.

In earlier versions of DBC, the printing of the word Hello would immediately be wiped out by the Sync. If I remember correctly, to fix it, you just need to put any text-based screen output after the Sync to make it work.



TDK_Man

Area 51
19
Years of Service
User Offline
Joined: 3rd Feb 2006
Location: UNKNOWN
Posted: 12th Feb 2008 15:44
The reason I need this to work is if I wanted to manipulate the words durring the loop. a text command actually works fine, but it just dosent make sense that the print wouldn't.

Are we alone?
Code eater
17
Years of Service
User Offline
Joined: 17th Feb 2008
Location: Behind You!
Posted: 18th Feb 2008 21:04
Ive also had the same problem

Login to post a reply

Server time is: 2025-06-04 02:04:13
Your offset time is: 2025-06-04 02:04:13