Re: Image Not Appearing
- Posted by Lone_EverGreen_Ranger Dec 21, 2011
- 2043 views
Hello, I'm using Euphoria 4.0 and the most current version of the SDL wrapper. I am trying to blit an image to the screen, yet it is not showing on the screen.
I don't know about SDL, but whenever there is a problem, it's a good idea to let euphoria do some type checking, comment these out or use with instead of without. don't forget to turn them back off to get full speed later.
without warning without type_check
An error comes up. type_check failure, screen is {76, 111,103,111}. Called from line 170.
Obviously, you said screen is an atom, you cannot tell it to be "Logo".
useless
So I should make the variable 'screen' be an object or a sequence?
Yes, technically, restrict it to be a sequence. I would make it an object, but if you put -1 in it and treat it as a sequence, it will crash with a -1 in it either way.
EDIT: I made it an object, now I get the error, sequence lengths are not the same (4 != 5). What does that mean?
Means you should use equal(). I argued for getting rid of that "error" years ago, and i was disregarded. I thought it had been obsoleted in v4, but apparently not.
useless
I'm still a bit confused. Anyone able to show me what exactly I'm doing wrong with my code?