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 / Help, please correct my code!

Author
Message
Daz
21
Years of Service
User Offline
Joined: 26th Dec 2002
Location: United Kingdom
Posted: 5th Jan 2003 16:16
Hi, just need to know how to texture an object with a bitmap I have got with DarkMATTER. Here's what I've been doing :

MAKE OBJECT SPHERE 1, 100
LOAD IMAGE "slime1.BMP", 1
TEXTURE OBJECT 1, 1
WAIT KEY

But it keeps saying "could not load image at line 2"

Please say why my code is not working, and correct me on how to do it.
Thanks in advance.
The greatest enemy I have faced, is lag...
cybersamurai
21
Years of Service
User Offline
Joined: 2nd Jan 2003
Location:
Posted: 5th Jan 2003 17:18
I'm new to this but i will give it a crack,
is your project/code and the image saved in the same file?

Rusty Gears
cybersamurai
21
Years of Service
User Offline
Joined: 2nd Jan 2003
Location:
Posted: 5th Jan 2003 17:19
I mean the directory

Rusty Gears
Daz
21
Years of Service
User Offline
Joined: 26th Dec 2002
Location: United Kingdom
Posted: 5th Jan 2003 17:23
No, is that the problem, heard something about that, I'll try it out now...

The greatest enemy I have faced, is lag...
Daz
21
Years of Service
User Offline
Joined: 26th Dec 2002
Location: United Kingdom
Posted: 5th Jan 2003 17:34
Hmph, I started again to make a new project titled "ball".
I did the exact same code as the one I have posted above.
I clicked in the project manager to add my Bitmap, and chose to copy the media file into the current project thing.
I executed the program, but it said it could not find projects/ball or something, then carried on like it would normally execute a program and said it could not load the image.

Sorry if you can't read that, I'm a bit puzzled.

The greatest enemy I have faced, is lag...
cybersamurai
21
Years of Service
User Offline
Joined: 2nd Jan 2003
Location:
Posted: 5th Jan 2003 17:39
I got it to work just fine,

all i did was save the .dba and the .bmp in the same folder

Rusty Gears
Daz
21
Years of Service
User Offline
Joined: 26th Dec 2002
Location: United Kingdom
Posted: 5th Jan 2003 17:42
While I'm at it, I wonder if anyone could shorten this code. It's meant to be a countdown (10, 9, 8...etc.).

PRINT "10"
WAIT 1000
CLS
PRINT "9"
WAIT 1000
CLS
PRINT "8"
WAIT 1000
CLS
PRINT "7"
WAIT 1000
CLS
PRINT "6"
WAIT 1000
CLS
PRINT "5"
WAIT 1000
CLS
PRINT "4"
WAIT 1000
CLS
PRINT "3"
WAIT 1000
CLS
PRINT "2"
WAIT 1000
CLS
PRINT "1"
WAIT 1000
CLS
PRINT "BLAST OFF!"
WAIT KEY

I know it looks horrible, but I'm trying to use it in my code for the 20 line challenge.

Thanks in advance.

The greatest enemy I have faced, is lag...
Daz
21
Years of Service
User Offline
Joined: 26th Dec 2002
Location: United Kingdom
Posted: 5th Jan 2003 17:47
Thanks, Cybersamurai, it worked, I hate those little things where it's so simple to do but you just don't know what you're doing, if you get what I mean.
Thanks again, I'm ver grateful

The greatest enemy I have faced, is lag...
cybersamurai
21
Years of Service
User Offline
Joined: 2nd Jan 2003
Location:
Posted: 5th Jan 2003 17:47
Yay, i helped someone ^_^

Rusty Gears
Daz
21
Years of Service
User Offline
Joined: 26th Dec 2002
Location: United Kingdom
Posted: 5th Jan 2003 18:00
LOL, are you new too?

The greatest enemy I have faced, is lag...
MattIsFun
21
Years of Service
User Offline
Joined: 4th Jan 2003
Location:
Posted: 5th Jan 2003 18:02
I'm also new. You might try a loop, say
A = 10
WHILE A > 0
PRINT A
WAIT 100
CLS
A = A -1
ENDWHILE
You might further shorten it by using a FOR loop, but I never really needed extremely short code, so I don't use them and am not familiar with their workings, which are probably very simple...

Daz
21
Years of Service
User Offline
Joined: 26th Dec 2002
Location: United Kingdom
Posted: 5th Jan 2003 20:46
Okay, I'll experiment around with different commands, thanks.

The greatest enemy I have faced, is lag...
Daz
21
Years of Service
User Offline
Joined: 26th Dec 2002
Location: United Kingdom
Posted: 5th Jan 2003 21:11
Hey, Matt, the code you gave me isn't efficient enough, here's mine, it owrks a treat :

FOR A = 10 TO 1 STEP -1
PRINT A
WAIT 1000
CLS
NEXT A

The greatest enemy I have faced, is lag...
John H
Retired Moderator
21
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Burlington, VT
Posted: 5th Jan 2003 23:28
Try the INC and DEC commands. They are math commands. Read about them to make increasing and decreasing easier

RPGamer

Current - RPG: Eternal Destiny : Help Wanted!
http://www.halbrosproductions.netfirms.com
Dont ask those questions! Read the help files lazy!
jasuk70
21
Years of Service
User Offline
Joined: 3rd Dec 2002
Location: Hemel Hempstead
Posted: 6th Jan 2003 00:42
I still miss

Var++
Var--

From other languages.

Jas
John H
Retired Moderator
21
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Burlington, VT
Posted: 6th Jan 2003 03:17
Like INC and DEC

Current - RPG: Eternal Destiny : Help Wanted!
http://www.halbrosproductions.netfirms.com
Dont ask those questions! Read the help files lazy!
Daz
21
Years of Service
User Offline
Joined: 26th Dec 2002
Location: United Kingdom
Posted: 6th Jan 2003 19:22
Thanks for the reply, RPGamer, it's nice to know someone of your skill still has time to help the newcomers. Not sure about you, Jas, though, seeing as it isn't a revelent reply.

Q. to RPGamer,
how would I use the DEC command in my example, I find

FOR A = 10 TO 1 STEP -1
PRINT A
WAIT 1000
CLS
NEXT A

works very well. Cheers

The greatest enemy I have faced, is lag...
Daz
21
Years of Service
User Offline
Joined: 26th Dec 2002
Location: United Kingdom
Posted: 6th Jan 2003 19:28
Oh, just found out how I use DEC and INC, they could be quite useful in a game I'm currently working on (TBC), but my previous post is what I'm doing for my entry in the 20 line challenge. Thanks for bringing it up.

P.S. I'm trying very hard not to spam this thread.

The greatest enemy I have faced, is lag...
John H
Retired Moderator
21
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Burlington, VT
Posted: 7th Jan 2003 03:11
Spamming a thread isnt bad (you didnt dont worry) its when people spam the board instead of putting all their posts in one topic- they make a separate post for each topic which gets me mad.

Hope your doin good

RPGamer

Current - RPG: Eternal Destiny : Help Wanted!
http://www.halbrosproductions.netfirms.com
Dont ask those questions! Read the help files lazy!
Daz
21
Years of Service
User Offline
Joined: 26th Dec 2002
Location: United Kingdom
Posted: 7th Jan 2003 18:41
Of course, thanks, RPGamer for the reassurance. I keep hearing about this team for n00bs, I wonder if any of you have some advice on it.

Cheers again

P.S. Should I put in my sig?

The greatest enemy I have faced, is lag...
Daz
21
Years of Service
User Offline
Joined: 26th Dec 2002
Location: United Kingdom
Posted: 7th Jan 2003 20:36
Just testing how to code snippet...



Let's see if that worked...

The greatest enemy I have faced, is lag...
Daz
21
Years of Service
User Offline
Joined: 26th Dec 2002
Location: United Kingdom
Posted: 7th Jan 2003 20:37
YAY IT WORKED! Neat.

The greatest enemy I have faced, is lag...

Login to post a reply

Server time is: 2024-05-02 01:00:53
Your offset time is: 2024-05-02 01:00:53