Raised This Month: $51 Target: $400
 12% 

Platform_sep_char


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Byte
Senior Member
Join Date: Jun 2010
Location: 📦 CCSPlayer
Old 01-04-2017 , 04:35   Platform_sep_char
Reply With Quote #1

Is there an easy way to get platform friendly path separators?
PLATFORM_SEP_CHAR isn't defined.
__________________
STEAM: /id/invexbyte | Github: Mo Beigi | Discord: Byte#0017
Community: Invex Gaming | My Plugins: Click Me!

Byte is offline
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 01-04-2017 , 05:04   Re: Platform_sep_char
Reply With Quote #2

I don't think there is a way to detect OS in SM scripts. What do you need that for? '/' should work just fine on all Linux, Windows and OS X.
klippy is offline
Byte
Senior Member
Join Date: Jun 2010
Location: 📦 CCSPlayer
Old 01-04-2017 , 05:59   Re: Platform_sep_char
Reply With Quote #3

Quote:
Originally Posted by KliPPy View Post
I don't think there is a way to detect OS in SM scripts. What do you need that for? '/' should work just fine on all Linux, Windows and OS X.
Yeah I guess thats fine, was just curious.
__________________
STEAM: /id/invexbyte | Github: Mo Beigi | Discord: Byte#0017
Community: Invex Gaming | My Plugins: Click Me!

Byte is offline
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 01-04-2017 , 07:58   Re: Platform_sep_char
Reply With Quote #4

@SM Devs
Possibly add a new public constant for the path separator char that will be set when the plugin loads based on what OS it is?
klippy is offline
psychonic

BAFFLED
Join Date: May 2008
Old 01-04-2017 , 09:29   Re: Platform_sep_char
Reply With Quote #5

This is not necessary. All first-party APIs that take a file path automatically handle the separator.

If any are found not to, that's a bug.

Last edited by psychonic; 01-04-2017 at 09:29.
psychonic is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 10:05.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode