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
mesaratz
17
Years of Service
User Offline
Joined: 27th May 2007
Location: UK
Posted: 25th Mar 2009 01:37
Hi All

I am new to programming and seem to have hit a wall with bitmaps i can load them ok as they are in my folder along with all the other bits i need (i hope) but i get a error message when i try

COPY BITYMAP 0,1

it just sayes it dont exist but i thought that if you use the copy bitmap command it would just copy then screen bitmap to a empty space ie. bitmap 1.

any help would be a great help
Pillarofire
20
Years of Service
User Offline
Joined: 31st Dec 2003
Location: Good Question, <looks around.>
Posted: 25th Mar 2009 10:23
Did you create bitmap 1?

You should provide all the code that is giving you an error, so that we can properly assist you.
Rudolpho
18
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Sweden
Posted: 25th Mar 2009 10:51
Yes, like Pillarofire said, you must create bitmap 1 first.
A simple way would be like so:

That would set the dimensions of bitmap 1 to those of bitmap 0 so that it would fit in as supposed.

Panda games
16
Years of Service
User Offline
Joined: 30th Sep 2008
Location:
Posted: 26th Mar 2009 03:10
Did you try
?

http://www.pandagames.org
mesaratz
17
Years of Service
User Offline
Joined: 27th May 2007
Location: UK
Posted: 26th Mar 2009 15:40
Thanks for all your help

I hope i have got it right


I did have the create bitmap 1, 640,480 on the line with the IF just before i loaded bitmap "es1.bmp" BUT i trued it there and then on it,s own line but with no luck!!!

hope you can help

AND BY THE WAY I KNOW I KNOW THE WAY I HAVE PROGRAMMED THE ABOVE IS BAD BUT IT HAS BEEN YEARS (WELL ZX SPEC) SINCE I HAVE DONE ANY LOL
mesaratz
17
Years of Service
User Offline
Joined: 27th May 2007
Location: UK
Posted: 26th Mar 2009 16:12
you know i must be doing something so so wrong no matter where i add the create bitmap and then try to copybitmap 0,1 it just says

Runime Error 1002[Bitmap does not exist] at line 26

i am pulling my hair out

LOL
mesaratz
17
Years of Service
User Offline
Joined: 27th May 2007
Location: UK
Posted: 26th Mar 2009 16:22
tryed it at the start of the program but it just crashes the compile AAAAAAAAAAAAAAAAAAAAHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH
mesaratz
17
Years of Service
User Offline
Joined: 27th May 2007
Location: UK
Posted: 26th Mar 2009 16:30

RANDOMIZE timer()
show mouse
create bitmap 1,640,480
set display mode 640,480,32
rem font and scrren set up
set text font "Arial" : set text size 20
ink 0,255
cls rgb (255,255,255)
load bitmap "start.bmp",0

text 250,450, "Press left mouse button to start"
REPEAT
until mouseclick()=1
if mouseclick =2 then end
con=0
do
ink 0,255: cls rgb (255,255,255)
cp = int (rnd(99)+1)

set text size 12
if cp >=1 and cp =<50 then load bitmap "pc1.bmp",0:cargo():ink rgb(0,0,0),rgb(255,255,255):set text size 16:text 8,233,"PASSENGERS": TEXT 120,235, "NO PASSENGERS AVAILABLE":con=1

if cp >=51 and cp =<70 then load bitmap "pc1.bmp",0:pass(): set text size 30:text 22,18, "CARGO":set text size 16: TEXT 155, 10,"NO CARGO AVAILABLE": con = 1

if cp >=71 and cp =<90 then LOAD BITMAP "PC1.BMP",0:cargo():pass(): con=1
if cp >=91 and cp =<100 then load bitmap "pc2.bmp",0:charter(): con=1
wait 750
repeat
until mouseclick()=1
if con=1 then copy bitmap 0,1:load bitmap "es1.bmp": extra():con=0: region(): WAIT KEY: END
loop
[\code]

thats all the code hope taht you can help

Many thanks

Login to post a reply

Server time is: 2024-11-25 10:36:31
Your offset time is: 2024-11-25 10:36:31