lovromirnik 10 Posted April 26, 2015 Hello, how would I specify SCAR to load includes from the same folder as the Main Script is in, regardless of the location? Right now I had trouble transporting scripts from one computer to another because I had to change all the paths! Thanks a lot! Lovro Mirnik Quote Share this post Link to post Share on other sites
lovromirnik 10 Posted April 26, 2015 (edited) Just to give a little heads up, neither .\Include.scar or ScriptPath + Include.scar work.. - - - Updated - - - program Name; {.include ScriptPath + Include.scar} begin Include; PlaySound(ScriptPath + 'RandomSound.wav'); end. Including it that way returns an error that an Include has not been found at the specified path. If I remove the Include files the Sound gets played without problem. What am I doing wrong? Edit: Of course giving it the whole path works like a charm. See above problem why this isn't optimal for me. - - - Updated - - - Hello again, I've found that I've been wrong for not actually saving the Script into the same folder as the Include. After having it in the same folders I can call an include with either {.include Include.scar} and {$I Include.scar}. I reckon they do the same thing. Edited April 26, 2015 by lovromirnik Additional information that could prove to be helpful Quote Share this post Link to post Share on other sites
Wanted 12 Posted April 28, 2015 Yea you can't put functions /variables etc. in the includes {} area. $I Filename.scar will refer you to the includes folder/script folder automatically, otherwise enter the path manually or add \ to refer to subfolders. Quote Share this post Link to post Share on other sites
Bixby Sayz 4 Posted April 29, 2015 There is a search order it looks for includes if you don't include a path at all and just use the name of the include. Can't for the life of me remember the exact order. Think it's includes folder, scar application folder, script folder. Or something like that. Quote Share this post Link to post Share on other sites
Wanted 12 Posted April 30, 2015 ^ And if you really need to know you could test it by doing Test.scar and having TestProcedure; WriteLn( with different letters Quote Share this post Link to post Share on other sites