Jump to content

AppPath() does the / and \ format wrongly


scel5525pro2
 Share

Go to solution Solved by Josh,

Recommended Posts

  • Solution

Ultra uses backslashes in file names, for future consistency with Linux and Mac, and because it is easier to type "/" then to always remember to use a double forward slash in your code "\\". This normally works with no issues, but can cause a problem with some Win32 API commands, so you can just switch it to a Windows path like so:

s = s.Replace("/", "\\")

The Ultra API commands will treat back and forward slashes the same, so it's okay to mix them and it only matters for aesthetics.

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

Just now, Josh said:

Ultra uses backslashes in file names, for future consistency with Linux and Mac, and because it is easier to type "/" then to always remember to use a double forward slash in your code "\\". This normally works with no issues, but can cause a problem with some Win32 API commands, so you can just switch it to a Windows path like so:

s = s.Replace("/", "\\")

Does Ultra Engine’s LoadDir use / or \? If it uses / i could do something like LoadTable(LoadDir(NewPath))

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...