I'm coverting Nani commands to strings via ToString() and printing them in console. I've noticed that some of this commands are not converted or do not show in console. In my case, I tried to convert @goto and it showed nothing. I want to use ToString() as an if condition. Is there something I'm missing?
Showing @goto command in console
-
- Posts: 30
- Joined: 02 Feb 2021 19:11
Re: Showing @goto command in console
I thought I could use the alias instead of the class
-
- admin
- Posts: 538
- Joined: 11 May 2020 18:03
Re: Showing @goto command in console
Using a tostring of a type in conditionals is not a good idea. Consider using type checking instead: https://docs.microsoft.com/en-us/dotnet ... g-and-cast
-
- Posts: 30
- Joined: 02 Feb 2021 19:11
Re: Showing @goto command in console
Elringus wrote: ↑08 Feb 2021 19:37Using a tostring of a type in conditionals is not a good idea. Consider using type checking instead: https://docs.microsoft.com/en-us/dotnet ... g-and-cast
I did but it doesn't work, @goto is never read by IScriptPlayer.PlayedCommand, for some reason
-
- admin
- Posts: 538
- Joined: 11 May 2020 18:03
Re: Showing @goto command in console
I guess you're looking to check which command is being executed? In this case, use OnCommand event in the player service.