$gameScreen.showPicture + Variable (Help)

Hi guys.


What am doing bad with this code ? !!


Am try many test and search many forum


// Get the level inside variable 111 (= ex:3)
var LV = $gameVariables.value(111);
// Add string to LV so suppos now is = "iteme1-3"
var LV = "iteme1-" + LV;

// show picture withe the good name "iteme1-3"
$gameScreen.showPicture($gameVariables.value(119), LV, 1, $gameVariables.value(114), $gameVariables.value(115),
100, 100, 255, 0)




The LV = the name of the file.


All my file are named like this


iteme1-1, iteme1-2,  iteme1-3, ........


Tank you a lot
What happens when you try it?  Do you get an error message?  What does it say?  Do you have developer tools turned on?  What's in the console?  Do you know for a fact that variables 111, 114, 115, 119 and LV contain what you THINK they contain?  Where are you running it from - is this a script call within an event, or have you added it to one of the script classes - if so, which one?


Create an event that does a Show Picture command with the values you'd like to have in your script call, then in Game_Screen.prototype.showPicture add some code to report what each of the arguments contains.  Could be as simple as misunderstanding one/some of the parameters (eg - scaleX could be a fraction, with 1 being 100%, while you've got 100 in your call).
What happens when you try it?  Do you get an error message?  What does it say?  Do you have developer tools turned on?  What's in the console?  Do you know for a fact that variables 11, 114, 115, 119 and LV contain what you THINK they contain?  Where are you running it from - is this a script call within an event, or have you added it to one of the script classes - if so, which one?

ok I hate myself.
I think I am ready to sleep.

I fix the name that was not iteme1- but item1-


Tank you thoe code are ok.
🙂

Original thread: https://forums.rpgmakerweb.com/threads/gamescreen-showpicture-variable-help.63031/