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.

Author
Message
iammesol
21
Years of Service
User Offline
Joined: 8th Jul 2003
Location:
Posted: 9th Jul 2003 04:49
Hi, I am just starting to understand all this stuff. I LOVE DB! Theres one thing thats driving me nuts!
Im trying to make a planner for going into high school, and what i need for now is to make something that says "The current time is "and say the time.

This doesnt work! HELP!
CrayZemon
21
Years of Service
User Offline
Joined: 16th Jun 2003
Location: United States
Posted: 9th Jul 2003 05:01
People, please by reminded that there is a new rule around here. I'm not trying to be snotty, just positive towards the forum as it does take work to manage. The rule quotes:

"4) Please be verbose when asking your questions! Please dont post with a thread title "HELP ME!!!!" instead, try and be more informative, for instance "Please help me with functions." It is also a good idea to post some of your problem code and your system specifications so we can have a better idea of what is going on.

Thanks for your time reading this, and have fun with Dark Basic / Professional!

Cheers

RPGamer"


Anyway Iammesol, it would help if you posted the stuff in your function: get date$(). I would first like to point out that functions can't be two words but one in order to be work with the syntax. Under other circumstances, whitespaces don't mess up the code.

"I need gopher-chucks!!"
iammesol
21
Years of Service
User Offline
Joined: 8th Jul 2003
Location:
Posted: 9th Jul 2003 05:41
srry about rule 4 first time w/ forums get date$()is a function?
Tell me the EXACT coding for that plz

John H
Retired Moderator
22
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Burlington, VT
Posted: 9th Jul 2003 06:54 Edited at: 9th Jul 2003 06:58
You could always look in the documented help that comes with Dark Basic. Find your command, and there is a full working syntax example

RPGamer

EDIT: BTW Cray - I think your the first person I've seen mention those new rules I typed up - thanks for reading

Current Project: Eternal Destiny
Questions? Comments? Suggestions? Go to the Eternal Destiny Forum!
iammesol
21
Years of Service
User Offline
Joined: 8th Jul 2003
Location:
Posted: 9th Jul 2003 07:01
i did it all ways comes up w/ cannot dertimine parameter type

Mentor
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 9th Jul 2003 16:44
try this (take an asprin 1st)

Rem Project: dates
Rem Created: 09/07/03 13:40:42

Rem ***** Main Source File *****
sync on:sync rate 0:hide mouse
randomize timer()
set text opaque
set text size 40
set text font "v"
ink rgb((rnd(155)+100),(rnd(155)+100),(rnd(155)+100)),0
fs=10
zoom=1
do
a$=get date$()
b$=get time$()
a$=" Current date is:"+a$+" ":b$=" Current time is:"+b$+" "
if fs=40 then zoom=-1
if fs=10 then zoom=1
fs=fs+zoom
set text size fs
text ((screen width()/2)-(text width(a$)/2)),(screen height()/2),a$
text ((screen width()/2)-(text width(b$)/2)),(screen height()/2)+40,b$
sync
loop

hope that makes it clearer (LOL)

Mentor.

iammesol
21
Years of Service
User Offline
Joined: 8th Jul 2003
Location:
Posted: 9th Jul 2003 21:19
LMAO i think it did

iammesol
21
Years of Service
User Offline
Joined: 8th Jul 2003
Location:
Posted: 9th Jul 2003 21:31
still doesnt work!!!!

iammesol
21
Years of Service
User Offline
Joined: 8th Jul 2003
Location:
Posted: 9th Jul 2003 21:32
im using DB Pro if that makes a diff

Mentor
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 9th Jul 2003 21:38 Edited at: 9th Jul 2003 21:43
it was written in Pro, are you patched to 4.1?, it should work, I just tried the code in DB classic and it runs about 3 times faster LOL (errr....thats not supposed to happen? right? ) but has some graphical glitches, are you sure pro can compile the examples in the help system ok, maybe the compilers installed wrong?, try running some of the examples from the help, try this and tell me if it works.

a$=get date$()
print a$
do
loop


Mentor.

iammesol
21
Years of Service
User Offline
Joined: 8th Jul 2003
Location:
Posted: 10th Jul 2003 08:03
k

iammesol
21
Years of Service
User Offline
Joined: 8th Jul 2003
Location:
Posted: 10th Jul 2003 08:06
IT WORKED !!!!!
then how come it wont work there?

iammesol
21
Years of Service
User Offline
Joined: 8th Jul 2003
Location:
Posted: 10th Jul 2003 08:10
maybe b/c im saying center text rather than print .... try it

Mentor
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 10th Jul 2003 12:13
a$=get date$()
center text 300,200,a$
do
loop

works here, you maybe have a typo in the command, check your "," isn`t a ".", thats a common one to make and the computer will be too dumb to tell you whats wrong in an understandable manner, most error messages are of the "one size fits all" mentality.

Mentor.

iammesol
21
Years of Service
User Offline
Joined: 8th Jul 2003
Location:
Posted: 12th Jul 2003 03:25
do u have to do the do... loop after it?


a$=get date$()
center text 300,200,a$
do <------
loop <-------

andrew11
21
Years of Service
User Offline
Joined: 23rd Feb 2003
Location: United States
Posted: 12th Jul 2003 03:28 Edited at: 12th Jul 2003 03:28
You need a plus sign (+) between 2 strings. This should work:



"All programmers are playwrites and all computers are lousy actors" -Anon
iammesol
21
Years of Service
User Offline
Joined: 8th Jul 2003
Location:
Posted: 12th Jul 2003 03:40
ok ive gotten this

iammesol
21
Years of Service
User Offline
Joined: 8th Jul 2003
Location:
Posted: 12th Jul 2003 03:42
OMG !!!!!!! THANK U!!!!!!!! IT WORKS!!!!!

iammesol
21
Years of Service
User Offline
Joined: 8th Jul 2003
Location:
Posted: 12th Jul 2003 04:03
I dont have DBPro Its the trial version. but Im getting DBC for my B-Day!!! the newbie game making pack

iammesol
21
Years of Service
User Offline
Joined: 8th Jul 2003
Location:
Posted: 12th Jul 2003 05:42
B-Day=July 28

Mentor
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 12th Jul 2003 11:46
do-loop was just to stop the program going back to the editor before you had time to see the result, I could have used wait,keystate with a conditional loop or any of the other commands to pause it, thats just an endless loop, when it gets there it do-loops forever, do-loop-do-loop-do-loop-do....etc, until you hit esc anyway, cheers.

Mentor.

iammesol
21
Years of Service
User Offline
Joined: 8th Jul 2003
Location:
Posted: 12th Jul 2003 20:26
oh thx! nice idea!

Login to post a reply

Server time is: 2024-11-10 13:56:39
Your offset time is: 2024-11-10 13:56:39