How to Expose @AddChoice@

Posted: 24 Jan 2022 13:01
by RCBrickz

Hey there Elringus, just a quick question.

I've had to make some changes to make a part of my game work, but now I'm faced with a conundrum.

I need to be able to read the "Goto" in an "AddChoice" Command, so far, here's where I'm At:

CommandScriptLine Liner = (CommandScriptLine)ChoiceButtonLines[SelectedOption];
print(((AddChoice)Liner.Command.).GotoPath);

But I get this error:

InvalidCastException: Specified cast is not valid.

I was wondering what is the correct way to cast and "what" to cast in order to get the "AddChoice"

Thanks a lot.


Re: How to Expose @AddChoice@

Posted: 24 Jan 2022 13:23
by Elringus

That's a C# issue; check the official docs: https://docs.microsoft.com/en-us/dotnet ... ew=net-6.0