#im getting an error which state that it
1 messages · Page 1 of 1 (latest)
you cut off the liune numbers in your screenshots :((
the saddest of sadnesses
!code paste sites are better for sharing code
📃 Large Code Blocks
Use 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 format as C#, add cs to the first line:
```cs
// Your code here
```
Add a comment with a line number if there is an error message.
anyway it seems like the stateMachine variable is null
which means you didn't properly initialize it.
thankn you
so yeah again
it seems like the stateMachine variable is null
which means you didn't properly initialize it.
you'd have to assign stateMachine somewhere to a valid reference to your state machine
Showing the baseState code would be useful
and wherever you create or initialize these states
they're assigned in the base state script
or do i still need to do it for each script?
the basestate script
This code doesn't assign it to anything
it merely declares the variable
you would have to actually assign it to something
public StateMachine stateMachine; < this is just a declaration of a variable
to assign it to something you need to do stateMachine = something; somewhere
presumably this should be done at the point when you create the state
In such cases it's usually best if you use a constructor to ensure the machine is always set when creating the state.
so something like this?
https://gdl.space/luwamezono.cs