The command I'm using is
$game_variables[17] = $game_troop.members
[0].enemy_id
But, immediately as it's called to store it gives me the error
undefined method 'enemy_id' for [0]:array
Where and how are you using that script?
The issue is likely that it is split into two lines at a point where it should not be split.
$game_variables[17] = $game_troop.members[0].enemy_id
This works.
Sorry for my mistake, I copy and pasted directly from the script tab, which has an auto line break, after a certain amount of characters are there. It should be being run as one line.
I am using this script inside of a skill, with a common event inside. It's intended function is to be a sort of check skill, with different flavor text depending on the enemy, and user.
then give us a screenshot of the skill, and a screenshot of the console during the error message.
Ron, I changed the script to how you formatted it, and it started working. Thanks!