images

New to FreeBASIC? Post your questions here.
Post Reply
TurtleProgrammer
Posts: 37
Joined: Jan 26, 2017 7:54

images

Post by TurtleProgrammer »

in the attached code i get a "Type Mismatch" error when running. I thought freebasic used the LOADIMAGE.

Code: Select all

#include "windows.bi"


dim c as integer
dim square1 as integer
dim square2 as integer
dim square3 as integer
dim square4 as integer
dim square5 as integer

screenres 640, 320, 32
square1 = c * 6
square2 = c * 6
square3 = c * 6
square4 = c * 6
square5 = c * 6

colorifs:
if c = 1 then
    loadimage("e:\red.bmp", 32)
elseif c = 2 then
    loadimage("e:\blue.bmp")
elseif c = 3 then
    loadimage("e:\green.bmp")
elseif c = 4 then
    loadimage("e:\yellow.bmp")
elseif c = 5 then
    loadimage("e:\white.bmp")
elseif c = 6 then
    loadimage("e:\orange.bmp")
else goto colorifs
badidea
Posts: 2586
Joined: May 24, 2007 22:10
Location: The Netherlands

Re: images

Post by badidea »

Post Reply