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.

Newcomers DBPro Corner / text wont print

Author
Message
apophis
21
Years of Service
User Offline
Joined: 14th Jul 2003
Location:
Posted: 11th Aug 2003 06:12
It's my mos birthday soon and I wanted to make a simple program that said happy birthday flashing in different colors. I sat down to write the program starting ou with the standard text commands and the ink command and this iis what I have.

sync on
sync rate 30
cls

ink 0,rgb(300,300,300)
text 320,240,"HAPPY BIRTHDAY!"
set text size 72
set text to bold
center text 320,240,"HAPPY BIRTHDAY!"
wait key

but when the screen comes up it's just a regular black screen. Can someone tell me what I'm doing wrong and the proper way to set text color. I know it has something to do with the foreground and background colors of the ink command but I'm not sure what the foreground an dbackground colors are and what they effect.
thanks,
bandit
Lega
21
Years of Service
User Offline
Joined: 10th Aug 2003
Location: United States
Posted: 11th Aug 2003 06:30
One thing I noticed wrong with the ink command is that the integers can only go up to 255. I made a program that is simple to use and can help you with your birthday, here is the code:


REM this sets the resolution of the screen.
SET DISPLAY MODE 800,600,16

REM this just hides the cursor.
hide mouse

REM this makes the user enter the word(s) to be sprayed.
PRINT "Type words to be sprayed then press enter to type a new word."
PRINT "You can type a maximum of ten (10) words."
PRINT "Press [Escape] to quit."
INPUT word1$
INPUT word2$
INPUT word3$
INPUT word4$
INPUT word5$
INPUT word6$
INPUT word7$
INPUT word8$
INPUT word9$
INPUT word10$

REM this is just printing out the names in order using FOR NEXT.
DO
REM this makes it so the text is randomly placed around the screen.
SET CURSOR RND(800),RND(600)
PRINT word1$
SET CURSOR RND(800),RND(600)
PRINT word2$
SET CURSOR RND(800),RND(600)
PRINT word3$
SET CURSOR RND(800),RND(600)
PRINT word4$
SET CURSOR RND(800),RND(600)
PRINT word5$
SET CURSOR RND(800),RND(600)
PRINT word6$
SET CURSOR RND(800),RND(600)
PRINT word7$
SET CURSOR RND(800),RND(600)
PRINT word8$
SET CURSOR RND(800),RND(600)
PRINT word9$
SET CURSOR RND(800),RND(600)
PRINT word10$
REM this makes the text random colors.
INK rgb(rnd(255),rnd(255),rnd(255)),1
LOOP

REM this makes it so the program quits after escape is pressed.
end=ESCAPEKEY()
IF end>=1 THEN END

I hope this helps! Just run this program in the editor.

"Something wicked this way co- oh, wait, it took a left."
apophis
21
Years of Service
User Offline
Joined: 14th Jul 2003
Location:
Posted: 11th Aug 2003 06:34
thank you so much
-bandit

UnderLord
21
Years of Service
User Offline
Joined: 2nd Aug 2003
Location:
Posted: 11th Aug 2003 06:52
remember you can't simply put text you gotta put print in front of it hehe

http://www.freewebs.com/ingamers

Login to post a reply

Server time is: 2024-09-20 19:45:18
Your offset time is: 2024-09-20 19:45:18