Code: Select all
static function String FireMatt(String reason) {
return Localize("reasons", reason, "./layoffs/Matt");
}
event PostBeginPlay() {
Log(FireMatt("reason1"));
}
Wait (EDIT), but Linux uses slashes like in the example, so it should work with Linux too, can someone tell me if it does please?
You can try it with this folder+file already set: I wonder what else could be done this way, the cool thing is that you don't even need a variable for it, it's probably the safest way to obtain data with the warranty that the content won't be changed through other UScript classes, since const can be modified, same for INI files through saveConfig(which is not set private).
Also you can read files from other locations that don't have the System folder as parent, just using ".." instead of "." .