Confusing error

I've been trying to test my game. It seems to be working.

But… 2 friends downloaded the desktop version of Quest to try it. One of them gets an error when looking at a particular object. (Both say it works fine on the online version).

The error:

Error running script: Unknown object or variable 'canAdd'
Error running script: Error evaluating expression 'canAdd': The given key was not present in the dictionary.
Error running script: Error evaluating expression 'GetAllChildObjects(newParent)': Collection was modified; enumeration operation may not execute.
Error running script: Error evaluating expression 'ListCombine(ScopeReachableNotHeldForRoom(room), ScopeVisibleNotReachableForRoom(room))': Value cannot be null.Parameter name: collection
Error running script: Cannot foreach over '' as it is not a list
Error running script: Error evaluating expression 'ListExclude(ScopeVisibleNotHeldNotScenery(), game.pov)': Object reference not set to an instance of an object.

Any ideas what's going on?


One of them gets an error when looking at a particular object.

Which object?


Without knowing that, my guess is to change this block of code in ContainsAccessible:

      else {
        if (onlyReachable) {
          canAdd = CanReachThrough(searchObj.parent)
        }
        else {
          canAdd = CanSeeThrough(searchObj.parent)
        }
        if (canAdd) {
          return (ContainsAccessible(parentObj, searchObj.parent, onlyReachable))
        }
        else {
          return (false)
        }
      }

To this:

      else {
        // Set canAdd to false to avoid errors.
        canAdd = false
        if (onlyReachable) {
          canAdd = CanReachThrough(searchObj.parent)
        }
        else {
          canAdd = CanSeeThrough(searchObj.parent)
        }
        if (canAdd) {
          return (ContainsAccessible(parentObj, searchObj.parent, onlyReachable))
        }
        else {
          return (false)
        }
      }

Log in to post a reply.

Support

Forums