Error need help with
Posted by JaxonFerrero1 on Oct 21st 2023, 4:00PM
[Debug] Script error: Encountered an internal error, notify the brickplanet staff if the problem persists. (System.NullReferenceException at System.Object Invoke(System.Object, System.Reflection.BindingFlags, System.Reflection.Binder, System.Object[], System.Globalization.CultureInfo)) Lua (at [string "local function index(obj,name)..."]:11)

So i'm making a tycoon and when the first block gets collected and turned into cash, the other blocks no longer delete and the cash register doesn't update. At line 11 it goes cash=cash+1 but somehow errors, so HELP
Posted by 86 on Oct 21st 2023, 4:03PM
maybe you need to do cash.value += 1

idk tho because i dont have access to the bp workshop
Posted by JaxonFerrero1 on Oct 21st 2023, 4:04PM
So I found out with a pcall when the object gets destroyed it errors out, and not the cash=cash+1 thing but still need help
Posted by JaxonFerrero1 on Oct 21st 2023, 4:28PM
So i did a workaround by just setting the object position to the middle of nowhere, idk if it will lag but its good enough for me
Originally posted by JaxonFerrero1 on Oct 21st 2023, 4:28PM
So i did a workaround by just setting the object position to the middle of nowhere, idk if it will lag but its good enough for me
Posted by 86 on Oct 21st 2023, 10:49PM
it will lag
Posted by InsDel on Oct 21st 2023, 11:32PM
You find anything else out about this? I'll look into the issue you talked about, but are there any other things you noticed that may have caused the error?