NOTICE Notice: This is an old thread and information may be out of date. The last post was 454 days ago. Please consider making a new thread.
Results 1 to 9 of 9

Thread: Slash or backslash??

  1. #1
    Registered vitamin's Avatar
    Join Date
    Feb 2014
    Posts
    78

    Question Slash or backslash??

    I noticed that some mods use slashes in *.gen files while other backslashes.

    Example #1:
    Code:
    SearchPath=<VEHDIR>/Evolution/CUP
    Example #2:
    Code:
    SearchPath=<VEHDIR>\LANCIA_BETA_TURBO
    Both mods seem to be working fine (haven't noticed any errors in trace files). So does it mean that both methods are good, and rFactor doesn't care which character is used in SearchPath parameter?

  2. #2
    Interesting observation. Though from what I can tell, all the stock vehicles use the backslash convention. And it's usually the case that if there are several methods that work, only one of those methods are considered "good." So, are both methods good? I don't think so. Does rFactor care? Apparently not.

  3. #3
    Registered vitamin's Avatar
    Join Date
    Feb 2014
    Posts
    78
    It's even more interesting in sfx files. Here's one example:

    Code:
    VS_OUTSIDE_ENGINE_NEUTRAL_1=Evolution\Exterior\sce_ex_idle.wav
    VS_OUTSIDE_ENGINE_NEUTRAL_2=Evolution\Exterior\sce_ex_idle.wav
    VS_OUTSIDE_ENGINE_NEUTRAL_3=Evolution\Exterior\sce_ex_idle.wav
    VS_OUTSIDE_ENGINE_NEUTRAL_4=Evolution\Exterior\sce_ex_idle.wav
    VS_OUTSIDE_ENGINE_NEUTRAL_5=Evolution\Exterior\sce_ex_idle.wav
    
    VS_INSIDE_SHIFT_UP_1=Evolution/Interior/shift_up.wav
    VS_INSIDE_SHIFT_UP_2=Evolution/Interior/shift_up.wav
    VS_INSIDE_SHIFT_UP_3=Evolution/Interior/shift_up.wav
    VS_INSIDE_SHIFT_UP_4=Evolution/Interior/shift_up.wav
    VS_INSIDE_SHIFT_DOWN_1=Evolution/Interior/shift_down.wav
    VS_INSIDE_SHIFT_DOWN_2=Evolution/Interior/shift_down.wav
    VS_INSIDE_SHIFT_DOWN_3=Evolution/Interior/shift_down.wav
    VS_INSIDE_SHIFT_DOWN_4=Evolution/Interior/shift_down.wav
    Even though it seems to work, I think you're right about the backslashs, and rFactor. I checked some files from ISI original cars, and they use only backslashes there.

  4. #4
    Registered GFraser1965's Avatar
    Join Date
    Oct 2010
    Posts
    118
    Using Windows-Explorer (not Internet-Explorer) navigate to a car mod in your rFactor Vehicles folder.
    Then at the top click on the empty place in the search bar.
    You will see that the path shows up as:

    C:\Program Files\rFactor\GameData\Vehicles\F1-1967

    Windows is using a backward slash which I think is the preferred method.

    edited >> sorry I confused the wording backwards slash and forwards slash ........... now edited and corrected. Thanks for pointing out my error.
    Last edited by GFraser1965; 08-11-16 at 10:55 AM.

  5. #5
    Quote Originally Posted by GFraser1965 View Post
    Windows is using a forward slash which I think is the preferred method.
    No, a forward slash is "/". "\" is a backslash.

  6. #6
    Registered vitamin's Avatar
    Join Date
    Feb 2014
    Posts
    78
    Yes, backslashes is the way to go (even though rFactor seems to accept both slashes).

  7. #7
    Registered lordpantsington's Avatar
    Join Date
    Oct 2010
    Location
    Grand Rapids, MI
    Posts
    773
    Helpful hint for all that have problems confusing the two: Backslash is under the Backspace key.

  8. #8
    Registered Vince Klortho's Avatar
    Join Date
    Oct 2010
    Location
    California
    Posts
    102
    The C language libraries and Windows OS libraries both accept both the forward and backward slashes in file paths.

    In the first examples the predefined macro, <VEHDIR>, has a trailing backslash in it so the SearchPath statement does not need another one. It still works OK but it's unnecessary. It should read, SearchPath=<VEHDIR>LANCIA_BETA_TURBO

  9. #9
    Interesting.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •