1. BrickPlanet Forum
  2. Game & Scripting Discussion
  3. Error need help with
Error need help with
JaxonFerrero1
Level 4
Joined Nov 18th 2022
Posts 42
Posted Oct 21st 2023 at 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
86
Level 11
Joined Jan 9th 2023
Posts 445
Posted Oct 21st 2023 at 4:03PM
maybe you need to do cash.value += 1

idk tho because i dont have access to the bp workshop
JaxonFerrero1
Level 4
Joined Nov 18th 2022
Posts 42
Posted Oct 21st 2023 at 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
JaxonFerrero1
Level 4
Joined Nov 18th 2022
Posts 42
Posted Oct 21st 2023 at 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
86
Level 11
Joined Jan 9th 2023
Posts 445
Posted Oct 21st 2023 at 10:49PM
Originally posted by JaxonFerrero1 on Oct 21st 2023 at 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
it will lag
InsDel
🐢
Staff Member
Platinum
turtle shell fans
Level 9
Joined Nov 12th 2022
Posts 224
Posted Oct 21st 2023 at 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?

Search Forum

Thread Info

Replies
5
Views
15
Created Oct 21st 2023
Last Reply Oct 24th 2023