#well my problem is that this code

1 messages · Page 1 of 1 (latest)

balmy lava
#

Try putting a `Debug.Log("Path :" + LevelManager.main.path[pathIndex]); in start and see if the path is not null

rain raptor
#

How do you know it's not working?

rain raptor
#

that's the most important thing to start with

#

my guess is that code is simply running before this code

river pine
#

i got a new error now

#

with the debug.log

rain raptor
balmy lava
#

Ok, so you're missing a ref

rain raptor
#

or .path hasn't been assigned yet

#

you have to show where all this stuff happens

river pine
#

here is my level manager

#

with my path

rain raptor
#

and you still diodn't show where the UnassignedReferenceException is happening

rain raptor
balmy lava
#

Where is main assigned ?

rain raptor
#

!code

mellow needleBOT
#
Posting code

📃 Large Code Blocks
Large code blocks should be posted as links to services like:
https://gdl.space/, https://paste.ofcode.org/, https://hatebin.com/
https://paste.myst.rs/, https://hastebin.com/

📃 Inline Code
Surround code with three backquotes. Not quotation marks.
To get C# formatting the first line should only contain cs or csharp.
Add a comment with a line number if there is an error message.
```cs
// Your code here
```
Do not share screenshots of code unless requested.

river pine
rain raptor
#

show the levelmanager code and also:

you still didn't show where the UnassignedReferenceException is happening

river pine
river pine
rain raptor
#

and see which file/line it's happening in

river pine
#

and its the target thats supposed to get a value

rain raptor
#

and find the file/line where it's happening

#

you have at least two more scripts to show us:

  • LevelManager
  • Whatever script has the original error you are trying to solve in it
river pine
rain raptor
#

no

river pine
#

this is what comes up when i click it

rain raptor
#

I want to see code

rain raptor
#

and look at the bottom of the console

#

it will show the FULL error message

#

which will have the filename/line number

river pine
balmy lava
#

Or double click the error so that it shows it in VS

rain raptor
#

yes

rain raptor
river pine
#

its basically nothing

rain raptor
balmy lava
#

capital A

rain raptor
#

see how it's even warning you about it?

#

so that's not going to run at all

#

hence your issue

river pine
#

ooooh

#

i handt configured my ide before

#

so i didnt get a warning

rain raptor
#

well the warning was that main was null 😆

balmy lava
#

That's why the person told you to do it in the first place

river pine
#

i see

#

thanks for the help

#

already tried to solve it for an hour before asking for help