Author Topic: "data\\images\\" syntax error  (Read 2238 times)

Thunor

  • Guest
"data\\images\\" syntax error
« 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

Thunor

  • Guest
"data\\images\\" syntax error
« Reply #1 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

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10714
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
"data\\images\\" syntax error
« Reply #2 on: 2008-Jan-27 »
use "/" slashes _only_

Offline Moru

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 1775
    • View Profile
    • Homepage
"data\\images\\" syntax error
« Reply #3 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 :-)