Hello, I am new. I am using DBPro. Here is my problem:
I cannot get my program to tell me the width of an image. My code runs fine, including loading images, without my line of code to find the width.
#constant bg 1
#constant plyr 2
Global ImgH as Integer
Global ImgW as Integer
sync on
sync rate 60
backdrop on
autocam off
load image "red.png",bg
load image "goodGuy.bmp",plyr
x = screen width()/2
y = screen height()/2
imgW = bitmap width (plyr)
imgH = bitmap height (plyr)
The code compiles with the bitmap width command, but does not execute. I get error message 1002 - Bitmap does not exist at line 24.
I have also tried some code I saw on youtube, using the image width and image height:
#constant bg 1
#constant plyr 2
Global ImgH as Integer
Global ImgW as Integer
sync on
sync rate 60
backdrop on
autocam off
load image "red.png",bg
load image "goodGuy.bmp",plyr
x = screen width()/2
y = screen height()/2
imgW = image width (plyr)
imgH = image height (plyr)
loop
..but then I get the following error:
Could not determine parameter type of 'image width (2)' at line 24
Thank you in advance for your help!!!!!