MasterMagnus Posted April 21, 2016 Share Posted April 21, 2016 If I type this command from the console it works properly (having created the matching global in FO4 edit). if 6 == getglobalvalue "HG01_LoadID"; player.isessential; endif;Console shows:GetGlobalValue >> 6.00IsEssential >> 0.00Exactly as it should. But when I run this command in a batch file it does not work.Running a batch file with only this command (the console shows)bat battest> if 6 == getglobalvalue "HG01_LoadID"; player.isessential; endif;Mismatched if/else/endif block starting on line 1.Mismatched if/then/else block. Are there documented differences on what happens from a Batch file as opposed to typing in commands? Is the syntax for If/Then/Else/Endif different when running a batch than when typing from the console? Any help is much appreciated. Link to comment Share on other sites More sharing options...
Frikster Posted August 25, 2017 Share Posted August 25, 2017 Bump.I have the exact same problem and I really would like to find a solution. See reddit post for reference (has my load order). Is there still no solution? This seriously doesn't seem right. I've seen other people post their batch files with if-statements in a separate post here and they don't get this mismatched error that we get. Link to comment Share on other sites More sharing options...
Frikster Posted August 26, 2017 Share Posted August 26, 2017 (edited) This is mortifyingly depressing given how much potential there would be for hotkeys otherwise: What's mentioned above doesn't work for calling script using the bat <filename> for some reason, it'll only "accept" it if you use prid in front but doesn't work at all. Not sure of how much use this will be to people due to this, but I thought I'd share it at least. "While" or commands like that doesn't seem to exist. - source Edited August 26, 2017 by Frikster Link to comment Share on other sites More sharing options...
Jeddakya Posted February 28, 2020 Share Posted February 28, 2020 looks like neither of you are doing it exactly as shown. the documentation at the link Frikster provided says: "if <condition>; <todo if true>; elseif <condition>; <todo elseif true>; else; <todo if false>; endif". i'm not seeing elseif or else in either of your if-statements. Link to comment Share on other sites More sharing options...
Recommended Posts