you can't insert a plugin command by script code. Plugin commands can only be used by the event command for them.
if you want to call another plugin from a plugin you're writing, then what you need to do is to analyse the plugin you want to command and see which functions inside the plugin are triggered and called by the plugin command, and then call those functions directly in your plugin or script.
[QUOTE = "Andar, post: 898171, member: 11882"]
So I can't put a plugin command in a conditional branch?
where are you asking?
there is no problem to put a plugin command into the branches of an event command "conditional branch", because that is inside an event.
however it is not a good idea to place a plugin command inside a script - and there it doesn't matter if the script has a conditional branch or not.
your question makes no sense, because a conditional branch doesn't matter for plugin commands - what matters for a plugin command is if it is used in an event or in a script/plugin. Because a plugin command is an event command and should not be used outside of events.
No, you cannot put a plugin command as the Script part of a conditional branch. Plugin commands generally don't return a true/false value (or any value) anyway, so it would not make sense to put one there.
What is in the plugin description & parameters? I'm guessing that it will turn on a switch if the file contains the required text, or turn it off if it doesn't.
Actually, looking at the image in your last post, and your first post again, that is not a plugin command. It is just a function. And in that case, yes, you should be able to put it as the script portion of a conditional branch. But it depends on how the function is defined - what its context is.
Have you tried doing it the way you initially thought? What happens when you do? If you get an error, open up the dev tools (F8) and go to the Console, and show us a screenshot of what it says.
The correct filepath is not "/GameFolder/passPC.txt", but "./GameFolder/passPC.txt". You need the dot in front to specify that the filepath is going from the home directory of the game. Also, since the readFile is async, it might not have enough time to influence the result variable before it gets returned as false. I suggest substituting readFile in your function for readFileSync.
Also, I think try and catch is pointless here. You're never going to get a file not found error, since it's handled by C++ and mot by javascript.