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 / Functions

Author
Message
bergice
18
Years of Service
User Offline
Joined: 5th Jun 2007
Location: Oslo,Norway
Posted: 3rd Mar 2008 21:59
Hi, everybody!
I have DBC Trial (yes, i will buy it when period is over! ).
I have tried making functions, but it doesnt seem to work.
What it says is that it has come over a function o.O
Is it only for full DB or what?
I have also read my DB book, and i have copied the code EXCACTLY!!
But still doesnt work!
Help, please.

bla bla bla...
Libervurto
18
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 3rd Mar 2008 23:11 Edited at: 3rd Mar 2008 23:12
[edit]
double post

Libervurto
18
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 3rd Mar 2008 23:11 Edited at: 3rd Mar 2008 23:13
You don't want DB to run into a function or it will crash (as you found). You should put an END command before your functions so that your program doesn't crash.
The way you use functions is by calling them.

here's a little example



TDK
Retired Moderator
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 3rd Mar 2008 23:50
Quote: "I have also read my DB book, and i have copied the code EXCACTLY!!"


The code examples in books rarely work properly. The code in tutorials are usually more reliable:

http://forum.thegamecreators.com/?m=forum_view&t=99497&b=10

See number 6.

TDK_Man

Libervurto
18
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 4th Mar 2008 01:42
Quote: "The code examples in books rarely work properly."

mine worked fine.

Login to post a reply

Server time is: 2025-06-05 19:09:31
Your offset time is: 2025-06-05 19:09:31