I’ve encountered errors like this before, but they usually weren’t referring to the definition of a function.
Here is a link to the script, the error is on line 274.
https://playcanvas.com/editor/code/529780?tabs=10741985&line=274&col=33&error=true
prototype
is spelled wrong again.
The error is saying that it can’t find the property or create a property off the object reference as the object doesn’t exist.
Of course, again the auto complete turned itself off when the other problem came up, so it wouldn’t surprise me if there are more spelling errors in there. But even after fixing that it still returns the same error.
Found it. Had something to do with the fact that I was trying to get a value from it. Error came up when function was declared getDiceRoll = function(d1,d2,d3,d4,d5). After removing d1,d2,d3,etc. no more error.