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 / Why wont functions work for me?

Author
Message
Jay Bee
18
Years of Service
User Offline
Joined: 15th Jul 2006
Location: Ashford, Kent, England
Posted: 15th Jul 2006 23:19
Why the heck doesnt this work!??!!? It works fine in DB1, but not DB pro, I\\\'m really tearing my hair out here. Basically, functions refuse to work, this for example, does absolutely nothing, a window pops up and then disappears, no \\\"hello world\\\", no nothing. What. The. Hell?!?!?!

REM Start of program
DO
BetterPrint(10, 10, \\\"Hello world\\\")
END
LOOP

FUNCTION BetterPrint(x, y, t$)
SET CURSOR x,y
PRINT t$
ENDFUNCTION
RUCCUS
19
Years of Service
User Offline
Joined: 11th Dec 2004
Location: Canada
Posted: 16th Jul 2006 03:34
You dont seem to know much about programming structure or programming in general as of yet. If you read through your code, it would print the text fine, and then end the program. Instead of End you should have Sync. That mistake alone tells me you really need to go back to the extreme basics in programming, and read through the tutorials again.


Projects: Online CTF Game | Newcommer's Guide to FPS's
Jay Bee
18
Years of Service
User Offline
Joined: 15th Jul 2006
Location: Ashford, Kent, England
Posted: 16th Jul 2006 03:51
Ah sorry that was a misprint, I figured it out in the end, it was actually a software problem, sorry about that. Yeah I migrated from DB1, so I do know the language, I'm just getting to grips with the new TYPE stuff, rather groovy. In all the games I ever made with DB1, I always craved object oriented (I am quite practised in C++ and SDL), and DBpro is at least halfway there...
Dream And Death
18
Years of Service
User Offline
Joined: 21st Feb 2006
Location: The circus! Juggling job, kids and DBPro
Posted: 16th Jul 2006 10:55
Corrected:


"You get what everyone gets, you get a lifetime!" - Death, The Sandman Library

First you Dream, then you ... - Neil Gaiman, 2001

Login to post a reply

Server time is: 2024-11-26 15:48:19
Your offset time is: 2024-11-26 15:48:19