Script call to show pictures

Hello, I've been watching a tutorial to be able to create HUD and lifebar.
In order to show the health bar, a script was called. In the tutorial another version of RPG Maker was used, so the command is different.

Code:
=============================
TUTORIAL CODE
=============================

n = "HUD_lifebar"
x = 46
y = 22
sX = $gameVariables.value(24)
sY = 100
$gameScreen.showPicture(49, n, 0, x,
y, sX, sY, 255, 0)

My main CODE:
1650180344065.png


I found something like:
Code:
$game_screen.pictures[49].show("HUD_lifebar", 0, 46, 22, 100, 100, 255, 0)
But without success.

How can i 'translate' to RMXP?
The script call you found looks right to me. Maybe you didn't format it in the textarea properly.
Code:
$game_screen.pictures[49].show( 
"HUD_lifebar", 0, 46, 22, 100, 100, 
255, 0)
It's a common mistake made by many due to a bad design decision of the editor.
The script call you found looks right to me. Maybe you didn't format it in the textarea properly.
Code:
$game_screen.pictures[49].show(
"HUD_lifebar", 0, 46, 22, 100, 100,
255, 0)
It's a common mistake made by many due to a bad design decision of the editor.

I just found the solution, looking for a solution to another problem haha
The '(' needed to be on the same line as the .show, and I corrected the variable call.

1650187143955.png


This is how the code was with the position and syntax correction.

Thank you anyway.

Original thread: https://forums.rpgmakerweb.com/threads/script-call-to-show-pictures.146839/