GLBasic forum

Main forum => GLBasic - en => Topic started by: Thunor on 2008-Jan-26

Title: "data\\images\\" syntax error
Post by: Thunor on 2008-Jan-26
image_dir$ = "data\\images\\"

...is giving me a syntax error, but...

image_dir$ = "data\\images"

...doesn't.

What am I doing wrong?

Cheers
Title: "data\\images\\" syntax error
Post by: Thunor on 2008-Jan-26
dir$=GETCURRENTDIR$()
PRINT dir$, 100, 100
SHOWSCREEN

...solved it for me. GLBasic uses forward slashes in filenames even under Windows, so "./data/images/" works across platforms which is helpful.

Still, how would you have a string with multiple backslashes if it errors at two?

Regards
Title: "data\\images\\" syntax error
Post by: Kitty Hello on 2008-Jan-27
use "/" slashes _only_
Title: "data\\images\\" syntax error
Post by: Moru on 2008-Jan-28
Mabe this should be clarified in each help-subject for a command that needs a filename, might lower the support questions for people not able to load their images :-)