GLBasic failing to display sprites

Previous topic - Next topic

Maximillien

Hi guys

i purchased Glbasic recently on steam. Great language.
I'm just a beginner , and i'm in the middle of the tutorial.But i wonder why it won't display sprites? i just have a black screen
I made sure to write the simplest program possible, but it still fail, i wonder why?  :O

LOADSPRITE "icon.bmp",0
DRAWSPRITE 0, 100,400
SHOWSCREEN
KEYWAIT

cheers  :booze:

Qedo

if the "icon.bmp" file is present in the "Media" folder add at the beginning:
SETCURRENTDIR("Media")

Maximillien

I already did that , still not working. :'(
The one thing that surprises me, is that, it is an image generated by GLBasic itself in the program

Qedo

maybe I understood, try:
LOADSPRITE "..\icon.bmp",0

Maximillien

This time, it fail to compile :(

This is what it says

compiling:
C:\Users\wyzhe\AppData\Local\Temp\glbasic\gpc_temp0.cpp: In function 'int __GLBASIC__::__MainGameSub_()':
C:\Users\wyzhe\AppData\Local\Temp\glbasic\gpc_temp0.cpp:22:19: error: incomplete universal character name \U
 LOADSPRITE( CGStr("C:\Users\wyzhe\Desktop\SPRITE\icon.bmp"),0);
                   ^
*** FATAL ERROR - Please post this output in the forum

Qedo


Qedo

sorry, i confused DOS with GLB command
instead of LOADSPRITE "..\icon.bmp",0
try
LOCAL ok = SETCURRENTDIR("..") // One up level
LOADSPRITE "icon.bmp",0

provided that the bmp file resides in the parent folder

Maximillien

IT WORKSSSS  8)  8)  8)
Thank you for your patience with an annoying newbie like me, Qedo.  :)  :)