script calling picture.name() not working

I am trying to make it so my game checks what the name of picture id 30 is with the following conditional branch:

If: Script: $gameScreen.picture(30).name() === 'palmtree' {
Script:
$gameScreen.showPicture(
30, 'palmtreeHover', 0, $gameVariables.value(47)[0], $gameVariables.value(47)[1], 100, 100, 255, 0
);
}

but it doesn't work, does anyone know why
(additional info, i am using the PictureCallCommon plugin to make it so when the mouse hovers over picture 30 it calls this common event)

link to cell im referencing here
pictures:
1676650729361.png

1676650758171.png
If you open the console with F8 and type in $gameScreen.picture(30).name() what do you actually get?

That will help you to know whether it has the wrong name or you're referencing the incorrect ID.

Also, it looks like you have a stray opening brace at the end of your conditional script, that may be causing syntax errors.

Similarly a stray closing brace at the end of your other script command.
If you open the console with F8 and type in $gameScreen.picture(30).name() what do you actually get?

That will help you to know whether it has the wrong name or you're referencing the incorrect ID.

Also, it looks like you have a stray opening brace at the end of your conditional script, that may be causing syntax errors.

Similarly a stray closing brace at the end of your other script command.
Thanks for the advice, I got "palmtree" back in the console (exact copy paste). Also im not exactly sure what you mean by open brace, could you point it out for me?

I know the script should be working fine since it some copy pasted code i barrowed from another common event that works just fine, but i dont see anything wrong with the one in the conditional branch.
Also im not exactly sure what you mean by open brace, could you point it out for me?
Curly bracket if you're British.
If: Script: $gameScreen.picture(30).name() === 'palmtree' { <- this character should not be there

I notice you added screenshots, and the erroneous braces I pointed out in my first reply are in the code you typed into your post, but not present in the code in your editor.

Aside from that, you could try adding something like a Show Text inside of the conditional to make sure it is in fact registering as true. Or paste the script there into your Console to see if it does what you think.
When asking a question about a plugin, you should typically link to the plugin.

What do you mean it "doesn't work"? A couple of ideas:
  1. If the picture simply does not change to palmtreeHover:
    • In your first screenshot, picture 30 is set to palmtree if its current name is palmtree. Is that correct?
    • Is the plugin actually working? Maybe it has some easy-to-test feature?

  2. If the picture disappears (or doesn't show up at all) then check variable ID 47. You can do that via the console:

    $gameVariables.value(47)
Usually you'd track this kind of thing using a switch or variable, rather than having to fetch the picture and check its name. From what you've shown, though, your approach seems sound.
When asking a question about a plugin, you should typically link to the plugin.

What do you mean it "doesn't work"? A couple of ideas:
  1. If the picture simply does not change to palmtreeHover:
    • In your first screenshot, picture 30 is set to palmtree if its current name is palmtree. Is that correct?
    • Is the plugin actually working? Maybe it has some easy-to-test feature?

  2. If the picture disappears (or doesn't show up at all) then check variable ID 47. You can do that via the console:

    $gameVariables.value(47)

Usually you'd track this kind of thing using a switch or variable, rather than having to fetch the picture and check its name. From what you've shown, though, your approach seems sound.
  • by it doesn't work I mean nothing happens, no crashes or anything, the image just stays the same.
  • the plugin is definitely working as I've been using it for a bunch of other pictures already (just without the "if name is x requirement") and it works as intended.
  • when I initialize my game I spawn in the tree picture with the same exact code except palmtreeHover is replaced with palmtree so I dont think the issue is variable 47
nevermind im pretty sure its a bug with the plugin, i just replaced the whole common event with a text box and its not working, all the other pictures in my scene work just fine but for some reason just this picture is playing weird, my bad

edit: found the solution, it was a plugin conflict

Original thread: https://forums.rpgmakerweb.com/threads/script-calling-picture-name-not-working.155047/