Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Ocassionally people get:
SCRIPT ERROR: addrelations: Invalid get index 'id' (on base: 'Nil').
             At: res://files/globals.gd:1013

This is harmless, though the exact cause is not known. redle provided a solution on Discord:

If you simply add to globals.gd right after   func addrelations(person, person2, value):   and put in the lines

  if person == null || person2 == null:
    return

Be aware that the forum changes tabs to spaces (change the spaces before the "if" to 1 tab, and the spaces before the "return" line to 2 tabs)

Deleted 4 years ago

Do I change line 1011 right after that function to the new text, or do I make a new line?

While it is possible to add the new logic to the existing line 1011, unless you understand the code syntax it's better to simply make new lines.

so this one pretty much becomes the new line 1011 then right? 

Sorry, I've never done this before

The start of the function should look similar to this:

func addrelations(person, person2, value):
    if person == null || person2 == null:
        return
    if person == player || person2 == player || person == person2:
        return