Use Nani command at C#Script

Posted: 23 Apr 2022 05:04
by bugger

Id like to use below command at C#Script
@goto Script001.AfterStorm

I dont find how to describe ?????
var Goto = new Goto { Path = "????" };
Goto.ExecuteAsync();


Re: Use Nani command at C#Script

Posted: 23 Apr 2022 16:11
by idaot

It's exactly how you would specify a path in @goto, e.g Script001.AfterStorm.


Re: Use Nani command at C#Script

Posted: 23 Apr 2022 23:47
by bugger

var Goto = new Goto { Path = "Script001.AfterStorm" };

"Script001.AfterStorm" CS0029 Error
Do I need more command to use ?


Re: Use Nani command at C#Script

Posted: 24 Apr 2022 08:46
by idaot

My bad, it should be a NamedString and not a string, you can create one on the stop with new NamedString(scriptName, label).


Re: Use Nani command at C#Script

Posted: 24 Apr 2022 10:42
by bugger

It worked Thank you so much!!!

var aaa = new NamedString("Script001", "AfterStorm")
var Goto = new Goto { Path = aaa };
Goto.ExecuteAsync();