MV Check if variable matches actor id

I'm having a problem with checking the ID of an actor against a variable. From the menu, the player selects to use an item on an actor. The item runs a Common Event.

At the start of the Common Event, the actor's id is collected into variable 15. This works properly; I can check the variable with F9 and see it updates to the correct number.

After this, I have a conditional branch that checks a script:

```
$gameActors.actor($gameVariables.value(15)) == 3
```

I've also tried it with === to the same result.

Whether the variable matches or not, it always processes as Else. What do I need to change to make it properly verify the character?
What you're comparing there is the actor *object* to the number 3. It should go without saying that a complex object can never be equal to a number. What you want to do is check that actor's ID rather than the actor itself:

$gameActors.actor($gameVariables.value(15)).actorId() === 3
Thank you for that. That part now works properly. The next part I'm having trouble with is inputting a Plugin Command with variables. The plugin that I'm using is Szyu's CraftingSystem. I'm not sure, but I think they stepped away from this plugin some time ago? But it does everything else that I want.

To make it work, I need to know the recipe book's item ID and the crafted item's item ID. Both are collected into variables previously. Is there a way to reference variables within a Plugin Command? So far this causes an error.

```
CraftingSystem add_recipe $gameVariables.value(64): i$gameVariables.value(65)
```

To make it work directly, it would be like this:

```
CraftingSystem add_recipe 6: i9
```

Where 6 is the recipe book and 9 is the crafted item.
Got a link to the plugin?

Plugins will only allow variables to be used if the developer has written them that way. The i before your variable number looks weird and I would only expect it to work like that if it's specifically mentioned in the instructions/help file.
I got it to work. I downloaded SRD_PluginComEvals and set the code as:

```
CraftingSystem add_recipe ${$gameVariables.value(64)}: i${$gameVariables.value(65)}
```

The Szyu's CraftingSystem plugin is extremely useful for my needs. Thank you for checking up on me.

Original thread: https://forums.rpgmakerweb.com/threads/check-if-variable-matches-actor-id.155398/