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

Camel case config files and cvars


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
TnTSCS
AlliedModders Donor
Join Date: Oct 2010
Location: Undisclosed...
Old 11-28-2011 , 21:31   Camel case config files and cvars
Reply With Quote #1

I'm just wondering if case makes a difference when writing plugins.

I know it matters when trying to open a file, especially with linux because linux sees text.txt and Text.txt and TEXT.txt as 3 different files (on at least some builds).

So, in the .sp if I put

// Load translation file
LoadTranslations("DropMoneyOnDeath.phrases");

will that cause users who run linux issues? gpadmin in this post says it's causing him issues.

I guess the same question for cvars - should I not use caMeL caSE?
TnTSCS is offline
Impact123
Veteran Member
Join Date: Oct 2011
Location: Germany
Old 11-28-2011 , 22:15   Re: Camel case config files and cvars
Reply With Quote #2

This also often happens with maps.
I always curse those mappers :<
I would suggest to write it lowercase.

To come back to your question, if he renames the configfile then yes.
Otherwise he should not have any problems.

Yours sincerely
Impact
__________________

Last edited by Impact123; 11-28-2011 at 22:18.
Impact123 is offline
TnTSCS
AlliedModders Donor
Join Date: Oct 2010
Location: Undisclosed...
Old 11-28-2011 , 23:27   Re: Camel case config files and cvars
Reply With Quote #3

ya, so he must have done something funky because in the .sp I specified camel case, so it should have written it camel case - unless linux creates the file lower case
TnTSCS is offline
berni
SourceMod Plugin Approver
Join Date: May 2007
Location: Austria
Old 12-01-2011 , 13:01   Re: Camel case config files and cvars
Reply With Quote #4

Most people don't use any upper case on linux or for code files to prevent such problems from occuring.
__________________
Why reinvent the wheel ? Download smlib with over 350 useful functions.

When people ask me "Plz" just because it's shorter than "Please" I feel perfectly justified to answer "No" because it's shorter than "Yes"
powered by Core i7 3770k | 32GB DDR3 1886Mhz | 2x Vertex4 SSD Raid0
berni is offline
TnTSCS
AlliedModders Donor
Join Date: Oct 2010
Location: Undisclosed...
Old 12-01-2011 , 17:43   Re: Camel case config files and cvars
Reply With Quote #5

I agree with that - but if the plugin says to create the camel case config file shouldn't it create it camel case? Or will it create it in lower case on linux which would break the config file...
TnTSCS 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 08:37.


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