Computer Science Canada

HELP!!!! says illegal picture id "0"

Author:  swegsterous [ Thu Nov 19, 2015 8:54 pm ]
Post subject:  HELP!!!! says illegal picture id "0"

CODE:

var streetlight :string
get streetlight
var LightOn :int := Pic.FileNew
("lightbulb.jpg")
var LightOff :int := Pic.FileNew
("light.jpg")
%TrafficLight
%First and Second traffic light
if streetlight = "day" then
Pic.Draw (LightOn,maxx div 2-20,maxy div 4-50,1)
else Pic.Draw(LightOff,maxx div 2-20,maxy div 4-50,2)
end if

Author:  Tony [ Thu Nov 19, 2015 9:17 pm ]
Post subject:  RE:HELP!!!! says illegal picture id "0"

likely couldn't find the .jpg file to load. Maybe the file name is spelled differently, or it's in some other folder.

Author:  swegsterous [ Sun Nov 22, 2015 5:15 pm ]
Post subject:  RE:HELP!!!! says illegal picture id "0"

Its in the same folder as the file i dont understand whats wrong ?

Author:  swegsterous [ Mon Nov 23, 2015 11:23 am ]
Post subject:  Re: HELP!!!! says illegal picture id "0"

Problem solved --- something was wrong with the image and just needed to replace it with something else. I think I might have been how small it was or something ...


: