1. Trouble with the game?
    Try the troubleshooter!

    Dismiss Notice
  2. Issues with the game?
    Check the Known Issues list before reporting!

    Dismiss Notice
  3. Before reporting issues or bugs, please check the up-to-date Bug Reporting Thread for the current version.
    0.32 Bug Reporting thread
    Solutions and more information may already be available.

Any way to load a mod with an underscore in the name?

Discussion in 'Troubleshooting: Bugs, Questions and Support' started by Username, Mar 8, 2015.

  1. Username

    Username
    Expand Collapse

    Joined:
    Aug 2, 2013
    Messages:
    218
    I really like the map Straightline_Track (imo it's better than Endless Highway, which is pretty much the only other map with a super long straightaway, sorry Nadeox) but since the latest update, it no longer works since there's an underscore in it. Any way to make it work, or am I screwed? It's not going to be updated, so the mod maker fixing it is out of the window.
     
  2. tdev

    tdev
    Expand Collapse
    Developer
    BeamNG Team

    Joined:
    Aug 3, 2012
    Messages:
    3,031
    It should work, however, make sure the filename is correct case sensitive wise: a != A
     
  3. Username

    Username
    Expand Collapse

    Joined:
    Aug 2, 2013
    Messages:
    218
    it just gives me a gray screen when I start it that I can only get out of by exiting out of the game
     
  4. Nivracer

    Nivracer
    Expand Collapse

    Joined:
    Jan 23, 2014
    Messages:
    370
  5. Aboroath

    Aboroath
    Expand Collapse

    Joined:
    Aug 25, 2013
    Messages:
    3,804
    I know the underscore is a code thing but what exactly is it's function? I ask this because it seems if a mod has this it is somehow more solid
    and reliable.
     
  6. f1proracer

    f1proracer
    Expand Collapse

    Joined:
    Jul 5, 2014
    Messages:
    51
    No special properties that I know of. Usually an underscore is used to replace a space when naming files as spaces are often not valid in save files. As for the mods being more reliable that probably has to do with most of the experienced modders using underscores as a general rule of thumb.
     
  7. SixSixSevenSeven

    SixSixSevenSeven
    Expand Collapse

    Joined:
    Sep 13, 2013
    Messages:
    6,960
    2 places in computing where underscores are common. Code and filenames.


    On a command line operating system (or open a terminal on Mac and Linux or open cmd on windows) you usually type a program to run, then the parameters you want to pass into the program. Nano is a text editor I use on Linux. To open nano on the command line I'd simply type "nano". To open hello.c in nano, I'd type "nano hello.c", this is fine and dandy but to open hello world.c in a folder called example programs can cause issues. "nano example programs/hello world.c", invalid. Linux (or Mac or windows) would treat this as me telling nano to open the file " example", but also passing in the parameters "programs/hello" and also "world.c", nano doesn't know what to do with these so crashes. So its often considered poor practise to name a file or a folder with a space in it (can cause some problems in a few programs actually). You either skip the spaces entirely or use a hyphen or an underscore. Or in this example use: 'nano " example programs/hello world.c"' where the speech marks being passed into nano tell it to ignore the spaces as such.

    Variable names in programming can't have a space in them for similar reasons to above. So again, underscore just seperates 2 words without using a space.

    I want the variable "player age", not allowed because of the space
    playerage, playerAge, PlayerAge, player_age are all valid. I use the 2nd style. plauer-age is not valid as that is effectively player subtract age and not what you intended.
     
  8. Aboroath

    Aboroath
    Expand Collapse

    Joined:
    Aug 25, 2013
    Messages:
    3,804
    Absolutely perfect, thanks. I've seen this used in Beamng and as a rule I just automatically did it with two word map files just because. Intuition has it's
    place in this case. From here on out I suppose it could be used as a rudimentary way of avoiding confusing file names when creating in Torque/Beam.
     
  9. SixSixSevenSeven

    SixSixSevenSeven
    Expand Collapse

    Joined:
    Sep 13, 2013
    Messages:
    6,960
    I do it with absolutely everything on my PC. No files or folders I create have spaces in them.
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice