Logo Platform
logo amplifiers simplified

What syntax ? point point point

Reply
Copied to clipboard!
9 years ago
Oct 30, 2015, 6:49:24 PM
Hello,



I see some syntax near the same with different number of points

example :

[CODE]





[/CODE]



Sometime it's 2 points : Path="../EmpireTypeMajor/Garrison/ClassUnit"

Sometime it's 1 point : Path="./EmpireTypeMajor/Garrison/ClassUnit"



Is there an importance to this ?

Is there something to know about this, or it doesn't matter what I choose- result is the same and no bug.
0Send private message
9 years ago
Oct 30, 2015, 9:19:47 PM
In commandline environments, "." and ".." are aliases for different relative paths. "." is short for the current directory, where ".." is short for the parent directory. In DOS/Windows, "." is highly redundant and infrequently used. If the current directory was, say, "C:\Users\Documents", then that absolute path would be the same as the relative path ".", where ".." would be the same as "C:\Users". In the simulation, there is a hierarchy of classes which have a path structure much like that used in Unix/Windows. Different xml files have different default paths, so "." and ".." may not be the same thing, though in this case they may be (e.g., the default path is the root). In any case, you can always use an absolute path if the current directory is unknown. The path structure is laid out in the tutorial PDF, or you can run the game in debug mode and have a look at the simulation structure in-game.
0Send private message
9 years ago
Oct 30, 2015, 10:12:56 PM
This might work similar to how it worked in Endless Space, and if I recall correctly, in ES the "./" path only checked the direct parent of the element, whereas the "../" path checked all the way up to the highest level. I am no longer 100% sure on that, though, and I'm currently failing to find where I had read that explanation before.
0Send private message
9 years ago
Oct 31, 2015, 9:46:44 PM
As the others have said, ./ checks the current location, and ../ checks back one. .../ goes all the way back to the root of the simulation, and then continues from there.



Given that the two lines both work, it's probably the case that whatever you're working on 'lives' at the root of the simulation, so there is nowhere to travel back to in the case of ../
0Send private message
?

Click here to login

Reply
Comment