Error Accessed None 'options_main' from node Add Option in blueprint bp_save_options

Hey guys,

So I’ve got this error: ‘Error Accessed None ‘options_main’ from node Add Option in blueprint bp_save_options’. So the problem for me with resolving this issue is that I don’t really understand what it means… I know WHERE the problem is, but not why and how not solve it.

I’ve got a Widget Blueprint with a combobox called ‘cbb_resolutions’ and I call it from another blueprint as you can see in this screenshot.

As you can see I’ve referenced it, and it gives no compiler errors or whatever. But when this function gets runned it produces the error. So the problem is “Add Option”, but why? What is happening?

Hope anyone can help me, thanks!

You get those errors in the event that at some point in the runtime cycle that object is null, but still being called.

To combat these errors, always make sure objects you are using are valid before using them.

In your particular example above, drag a line from “Option Main” and look for the “Is Valid” function. This node will provide you with two exit points of True and False, so hook up the “True” to “Add Option” and you will be good to go.

Hope that helps :slight_smile:

P.S.: When you want to loop through an array, put a get for the array and drag a node from it and choose ForEachLoop (or loop with break depending what you need) because your loop will have an off by one error, your last index is length - 1 in an array, not length :slight_smile:

Hey Justin, thank you for you response. I’ve actually done that and the Option Main seems to be invalid always. I’ve got a new thread opened because I forgot about this one… It has some new code and more explanation. Please take a look, I hope you see what I’m doing wrong. Access Widget variables from Blueprint Function Library - Blueprint - Unreal Engine Forums