am encountering a doubt on a null value for a local variable in attack montages. I rechecked but it is still showing me the same. Kindly help, below are the screenshots. I dont know which actor is causing the problem here.
Based on the error, the value returned from GetMainWeapon() via Combat Component is what is returning null. What does that function look like? Are you positive that it is returning a valid weapon?
It is working for the other logics so I guess it should be working fine
And what is Main Weapon? Where is this value being set?
If you use an IsValid check on the return value of Get Main Weapon, does it show as being valid or no? Do all these runtime errors still appear after adding the valid check?
This is the IsValid macro I am referring to, as an example:
I checked the get main weapon is returning the valid response.
Based on your warnings/errors, I don’t know how that is possible you are getting a valid value but its telling you its returning null
If GetMainWeapon is returning something valid, then the next thing to do is to check the value from the Select Node. If Random Index is false, then I would see if the attack index being provided is a valid int based on the attack montages array; usually you would get a warning/error about an out of bounds if that were the case so I am not confident in this guess. For now, check if the Return Value from Select is valid; the value going into L Attack Montage. If that doesn’t work, then I have no other suggestions; perhaps someone else can help. Good luck.