Error running function 'GiveOrders'

This seems linked to "spreadattack", which is also named "shift-G" (it's hotkey by default). Are you using / pressing this hotkey at random ? It seems like it tries to run the code for this, without having unit selected.
Never add this issue, so it might also be an issue with a mod.

@keyser said in Error running function 'GiveOrders':

This seems linked to "spreadattack", which is also named "shift-G" (it's hotkey by default). Are you using / pressing this hotkey at random ? It seems like it tries to run the code for this, without having unit selected.

Thanks for the quick reply. I am not pressing the hotkey at random (at least I don’t think I am), although to be sure I might remap it.

Never add this issue, so it might also be an issue with a mod.

Yeah, I will take off some mods and see how it goes, though I only really use the standard stuff other people use as well. I was only able to find one other case of this happening: https://forums.faforever.com/viewtopic.php?f=3&t=14883 at the bottom.

I took off Selection Deprioritizer, and the issue went from appearing 1-10 times a game, to 0. Guess I will either have to play without it or live with the error since it is one of my favourite mods.

I also use selection deprioritizer, and i don't get the bug you are getting.

Have you tried to set up the 'unit split' function provided by the 'UI Party' mod?
I tried that and it messed with the keymap.lua

I have tried it about a year ago or so. I will delete and redownload it 👍

@Stealth9
Sorry if this is a dumb question, but you are talking about the keymap found under ProgramData\FAForever\gamedata\lua.nx4\lua\keymap, right? I didn’t find anything else

Not a dumb question. I just thought that's what it was called. I meant the 'game.prefs' file. You can find it easy when you click on the top left menu inside the FAF launcher. Have a look at This thread on the old forum.

It boils down to:

  1. open the 'game.prefs' file (ms note works but notepad++ will be easier)

  2. find the part that defines the 'user key actions'. '
    It starts at line 1381 for me and it looks like this:

UserKeyActions = {
                select_all_naval_factories = {
                    order = 52,
                    action = 'UI_SelectByCategory STRUCTURE FACTORY NAVAL',
                    category = 'selection'
                },
                ['Select split group 5'] = {
                    order = 15,
                    action = "UI_Lua import('/mods/UI-Party/modules/unitsplit.lua').SelectGroup(5)",
                    category = 'UI Party'
                },
                ['Split land units by role'] = {
                    order = 34,
                    action = "UI_Lua import('/mods/UI-Party/modules/unitsplit.lua').SelectNextLandUnitsGroupByRole()",
                    category = 'UI Party'
                },
                ['Split selection into 7 groups'] = {
                    order = 7,
                    action = "UI_Lua import('/mods/UI-Party/modules/unitsplit.lua').SplitGroups(7)",
                    category = 'UI Party'
                },
                select_anti_air_fighters = {
                    order = 41,
                    action = 'UI_SelectByCategory AIR HIGHALTAIR ANTIAIR',
                    category = 'selection'
                },

You can see that every action has a specific 'order' number assigned. Double check if there are numbers that are used for more than one action! If yes then rename one order to a number that is not used.

@Stealth9 Yeah, my .prefs is full of these conflicts, to the point where it just takes too long to fix. I will just make a new .prefs file, which is overdue for me anyway. Thanks for your help, I hope this finally fixes it.

I fixed my .prefs and I still get the error, I am going to have to remove Selection Deprioritizer permanently I guess. Thank you for your help anyway.