I made some changes to Mr.Loathsome's BotOrders mutator, and the changes seem to work when I look in-game at the orders the bots have, but I now get the following script warning for each bot (the map doesn't matter, it's just where I tested it):
ScriptWarning: BotOrders DOM-Bullet.BotOrders0 (Function BotOrders.BotOrders.ModifyPlayer:0151) Accessed None 'Game'
I was wondering if this error affects behavior, or if I can safely ignore it considering I properly see the changed orders the bots have.
Does "Scriptwarning [...] Accessed None 'Game'" affect something?
-
Zerofinity
- Novice
- Posts: 15
- Joined: Sat Jun 07, 2025 8:24 pm
-
Barbie
- Godlike
- Posts: 3351
- Joined: Fri Sep 25, 2015 9:01 pm
- Location: moved without proper hashing
Re: Does "Scriptwarning [...] Accessed None 'Game'" affect something?
It depends... Often this WARNING is caused by code that is trying to access an object or variable that does not exist (anymore). Usually the game will not crash or severely impaired, but these error may have side effects.
Maybe show your changes so we can fix that.
Maybe show your changes so we can fix that.
"If Origin not in center it be not in center." --Buggie
-
Zerofinity
- Novice
- Posts: 15
- Joined: Sat Jun 07, 2025 8:24 pm
Re: Does "Scriptwarning [...] Accessed None 'Game'" affect something?
Fortunately, it looks like I managed to fix the problem. The problem was caused as the mutator first looked for Assault >>> if ( Level.Game.GameName == "Assault" ) <<<, then had a nested if else >>> if ( DeathMatchPlus(Level.Game).bTeamGame ) <<< with an else nested within that, to have 3 different variations (1 for Assault, 1 for TDM, the rest for CTF and DOM and anything else).
I wanted to change it to a more "as intended by the devs" while still removing the supremely useless Follow, so I changed up the variations to have 1 for Assault, 1 for CTF, and the rest for TDM and DOM (since those all use Freelance by the devs other than Follow), so I changed up >>> if ( DeathMatchPlus(Level.Game).bTeamGame ) <<< to >>> if ( CTFGame(Level.Game).bTeamGame ) <<< and added a >>> if ( B.Orders == 'Follow' ) <<< condition to CTF, but I then ended up with the error in DOM and TDM. I tried a bunch of different things including using the GameName instead, but I initially couldn't get anything else to do the commands properly.
However, I guess I was overcomplicating stuff, as even though I had tried some different stuff with GameName before (such as making a different usecase for each different mode), eventually just simply using >>> if (( Level.Game.GameName == "Capture the Flag" ) || ( Level.Game.GameName == "Carry The Flag" )) <<< did the trick: no more script errors while bots still get the proper commands.
I wanted to change it to a more "as intended by the devs" while still removing the supremely useless Follow, so I changed up the variations to have 1 for Assault, 1 for CTF, and the rest for TDM and DOM (since those all use Freelance by the devs other than Follow), so I changed up >>> if ( DeathMatchPlus(Level.Game).bTeamGame ) <<< to >>> if ( CTFGame(Level.Game).bTeamGame ) <<< and added a >>> if ( B.Orders == 'Follow' ) <<< condition to CTF, but I then ended up with the error in DOM and TDM. I tried a bunch of different things including using the GameName instead, but I initially couldn't get anything else to do the commands properly.
However, I guess I was overcomplicating stuff, as even though I had tried some different stuff with GameName before (such as making a different usecase for each different mode), eventually just simply using >>> if (( Level.Game.GameName == "Capture the Flag" ) || ( Level.Game.GameName == "Carry The Flag" )) <<< did the trick: no more script errors while bots still get the proper commands.
-
JackGriffin
- Godlike
- Posts: 3829
- Joined: Fri Jan 14, 2011 1:53 pm
- Personal rank: -Retired-
Re: Does "Scriptwarning [...] Accessed None 'Game'" affect something?
If you see repeated scriptwarnings like that then you absolutely should fix whatever issue is causing it. UnrealEngine's garbage collection is not great until a map change triggers some collecting so these errors can keep compounding. Your players might feel it as server lag as it can get bogged down. Ferali really impressed upon me the value of logging your code out until you find the offending issue(s) and not giving up until you do. I've spent considerable time isolating particular error returns but it's very satisfying when you get it and the log comes back clean. Doing this well will make you a much better developer so don't just ignore it to do other 'cool' things.
So long, and thanks for all the fish
-
Letylove49
- Masterful
- Posts: 537
- Joined: Tue Feb 28, 2012 7:47 pm
- Personal rank: AK admin
- Location: suisse
Re: Does "Scriptwarning [...] Accessed None 'Game'" affect something?
For access none you can fix it with this :
Code: Select all
if ( variable != none )