Hello I get this error when I try to run my game. I don’t know whats wrong. I have tried to google this error, but I didn’t find the solution.
Wish you explained how it’s supposed to work to start with. There is another issue with this script with the way Random is accessed but more on this later.
- how many tiles are there really - when you print the array length after getting actor of class, what do you get?
- even if there are more than 0, are those actors in the tile list valid - can you validate them?
- modulo (length - 1) would avoid the last array element - is this intentional?
- at a glance, it seems there is only a single tile references in the array
@Everynone I am making board game where you get random number(that random acts as a dice) and that random number will tell player how many tiles he have to move.
At the moment there is 19 tiles but there will be 39 tiles in total later on.
Could you address the bullet points above, we can’t really tell what’s going with the info given so far.
-
40 and I get 40
-
I think they are
-
Actually I don’t know because I copied from another post and so I am not sure what it does
Could you run a ForEach
loop → isValid
to make sure the array is full of stuff that actually makes sense. It’s easy to set an array X amount of objects that do not exist - null references.
I am not sure what it does
It wraps the value around, but you’re skipping the last tile if you -1
Which blueprint I put that loop?
- yes, what do you get when you print?
- and then, how did you get the tiles in the array to start with?
Accessed None trying to read property CallFunc_Array_Get_Item_1”. Node: Simple Move to Location Graph: EventGraph Function: Execute Ubergraph BP PC Blueprint: BP_PC
Do you get this all the time? Only when you Move Player?
CallFunc_Array_Get_Item_1
Is it always Item_1 or different ones?
Yes I get and its always the same