Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags
(+1)

I ran into a similar error to this today, though quite a different context, nothing to do with rooms just calling functions and functions of structs. Was at first baffled what the stack trace and "invalid with reference" meant, but your above notes helped narrow it down to 'self' references.

I'm pretty sure it was that I was passing in self variables to functions, and then calling the temporary variable the same thing. So eg:

bean = 1
some_func(bean)

function some_func(bean) {
    something = 1 + bean;   
}

I removed all of the instances I'd done this and just allowed accessing self.bean inside the function. I initially set this workflow up thinking other instances would call the function, but conveniently not the case any longer. I can imagine a case where the above might be not possible and instead renaming the local variables may fix it?

Hope these thoughts help some beans!