I'm trying to add a little cheat system in a game I'm making. What I'm having trouble with at the moment is an event that lets me add an item to the inventory by ID. So far I've got an event that sets variable id 0152 with button input processing, then I was going to use a script to add the specified item. I'm not so good at scripting so I just guessed this by looking at other scripts...
$game_party.gain_item ($game_variable[152], 1)
Anyone know what I'd have to change to make this work? It works if I specify an item id, but how can I make it work to use the variable as the item id?