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 / Losing and Gaining Money

Author
Message
Zeus
18
Years of Service
User Offline
Joined: 8th Jul 2006
Location: Atop Mount Olympus
Posted: 8th Jul 2006 21:41
How do I make it to where people can make and loose money?

><Jordan Stories Games><
Zotoaster
20
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 8th Jul 2006 21:57
Simple variables my friend.. if you want to have lots of people I stringly recommend arrays (Dim command).

Zeus
18
Years of Service
User Offline
Joined: 8th Jul 2006
Location: Atop Mount Olympus
Posted: 8th Jul 2006 21:59
Can I have a code for variables, I am only a beginner!

><Jordan Stories Games><
RUCCUS
20
Years of Service
User Offline
Joined: 11th Dec 2004
Location: Canada
Posted: 8th Jul 2006 22:34 Edited at: 9th Jul 2006 00:47
Hehe, "stringly".

<EDIT> I pointed that out because the topic of discussion was on variables

Pincho Paxton
22
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 9th Jul 2006 00:05
This thread is wasting our time. Too easy.

Zotoaster
20
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 9th Jul 2006 00:06
I suggest you try some tutorials and check out some other codes, try to understand DB a little more, then try to make this game.

Sixty Squares
18
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 9th Jul 2006 13:42
A variable can be whatever you want! Check out the different types in the help files. Let's play with a variable named, um... BOO. Here's boo as an integer: BOO (Notice that nothing has changed )here he is as a string: BOO$ .Now for BOO as a real number: BOO#

===Look at the help files they'll solve this for ya.

My Functions: Mine
Post yours: Post
Dr Manette
19
Years of Service
User Offline
Joined: 17th Jan 2006
Location: BioFox Games hq
Posted: 9th Jul 2006 17:39 Edited at: 9th Jul 2006 17:39
Okay, I'll try this quick and simple.

To use a variable, you can do money=10 or money#=10, the latter being a real number that can have decimals and negatives. You can add or subtract from this variable one of two ways. One way is to do money=money+1 or money=money-1. The second way is to do inc money,1 or dec money,1. For some reason, I have had some problems with inc and dec, so I prefer using the first way. In any case, you should definately look at the tutorials and help files with darkBASIC; they help a heck of a lot. Cheers.

Bio Fox...four guys, one computer, games like nobody's business.
Sven B
20
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 9th Jul 2006 20:01 Edited at: 9th Jul 2006 20:02
backdrop off
open to read 1,"alley01.bat"

print "Bowling Alley Tycoon!"

input "Bowling Alley Name:",alley$
input "Owner:",owner$
input "Number of Lanes(max.2000):",lanes$

print "Is this right?"

print " ",alley$
print " ",owner$
print " ",lane$

print "Be Ready!"



load object "BOWLALLY.x",1

print "Hire Employees!"
input "Maintenence Worker:",worker1$
print "Insurance Manager: State Barn"
input "Snack Bar Dude:",worker2$
input "Change Giver:",worker3$

print "Employee List For ",alley$
print "Maintenence Worker: ",worker1$
print "Insurance Manager: State Barn"
print "Snack Bar Dude: ",worker2$
print "Change Giver:",worker3$

OPEN TO WRITE 1,"alley01.bat"

Isn't this your own program?

It's the programmer's life:
Have a problem, solve the problem, and have a new problem to solve.
Sixty Squares
18
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 25th Jul 2006 00:57
Oh and to increase a variable you can do one of 2 things:

Money=Money+1

or...

inc Money,1

Both increase the variable "Money" by 1. To decrease, try:

Money=Money-1

or...

dec Money,1

These both decrease the variable "Money" by 1.

Uncle Sam
19
Years of Service
User Offline
Joined: 23rd Jul 2005
Location: West Coast, USA
Posted: 25th Jul 2006 04:28
Quote: "Jordan Stories Games"


What?

Uncle Sam
Nvidia Geforce 7600 GS 256MB PCIEx, 2.66 GHZ Pentium 4 proccessor, 768MB RAM
Need particles? Click here!
Zeus
18
Years of Service
User Offline
Joined: 8th Jul 2006
Location: Atop Mount Olympus
Posted: 30th Jul 2006 16:09
Thanks You Guys.

Sonic 91 Software
20
Years of Service
User Offline
Joined: 19th Mar 2005
Location: In a Cryptic Crossworld!
Posted: 5th Aug 2006 14:12
no problem. although i've only just dropped in!

I am a Christian and I know that God loves me. That is what makes my life so great!
Cash Curtis II
20
Years of Service
User Offline
Joined: 8th Apr 2005
Location: Corpus Christi Texas
Posted: 5th Aug 2006 14:32
Quote: "How do I make it to where people can make and loose money?"

Paypal $100 to my e-mail address and I'll show you how.


Come see the WIP!

Login to post a reply

Server time is: 2025-05-25 12:41:48
Your offset time is: 2025-05-25 12:41:48