Gold Randomizer Script Help

Recently I have been working on an easy gold randomizer for dungeon chest loot. And I have made it through Controlling Variables. 

However, I got a small line of script from the internet that I assumed told the player how much Gold he got from the chest.

But I was wrong.... Here is the script. (it is seriously only like 5 letters)

(\v[4])

bandicam 2014-01-06 22-18-30-718.jpg 

This is what it does when you walk over it...

bandicam 2014-01-06 22-23-49-956.jpg

But as you can see in the top left corner, the character had actually looted 27 Gold. 

Is there a script that would tell the player how much Gold he got? 

And if not how should I go about this. 

P.S.

I couldn't find the Script Support Forum so I posted here, sorry if that is an inconvenience. 
Your event is set up properly, with 1 problem.  You're using variable 6 to randomize the gold you gained, but you're using variable 4 in the text display.

In \v[x], x refers to the variable id.
I'm new to this stuff. 

That worked. 

Thank you!
Note - this is not a script. This is an event. Script in RPG Maker means something else completely, so your thread title is a little misleading. Just for future reference 😉


This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/gold-randomizer-script-help.22020/