i'm curious with the error line here:
Code:
//$gameMessage.add(nome + ' aprova. \i[84]' + $gameVariables.value(id) + '/10');
why there's '//' that make the script 'comment' the line there?
and unexpected end of input error means there script is not 'complete' form (lack of closed brackets, etc)
you might want to recheck your script call command...
also the script call box has limit on number of lines you can put. so maybe your script call got
'cut' at the bottom...
try removing some unecessary lines like console.log
or make it one liner as possible. (placing multiple lines in one line)
because script call box have super long width to the right
example in your script above
Code:
for (i = 0; i < $gameParty.members().length; i++){
var id = $gameParty.members()[i]._actorId; var nome = $gameActors.actor(id).name();
console.log(id); console.log(nome);
if ($gameActors.actor(id).isStateAffected(33)){ //Agree
$gameVariables.setValue(id, $gameVariables.value(id)+1); $gameMessage.add(nome + ' approves. \i[84]' + $gameVariables.value(id) + '/10');
} else {
if ($gameActors.actor(id).isStateAffected(35)){ //Disagree
$gameVariables.setValue(id, $gameVariables.value(id)+1);$gameMessage.add(nome + ' Disapproves. \i[84]' + $gameVariables.value(id) + '/10');
}}}
at the end i put all the '{' in one line to save lines...
if you want to be more extreme:
Code:
for (i = 0; i < $gameParty.members().length; i++){var id = $gameParty.members()[i]._actorId; var nome = $gameActors.actor(id).name(); console.log(id); console.log(nome); if ($gameActors.actor(id).isStateAffected(33)){ $gameVariables.setValue(id, $gameVariables.value(id)+1); $gameMessage.add(nome + ' approves. \i[84]' + $gameVariables.value(id) + '/10'); } else { if ($gameActors.actor(id).isStateAffected(35)){$gameVariables.setValue(id, $gameVariables.value(id)+1);$gameMessage.add(nome + ' Disapproves. \i[84]' + $gameVariables.value(id) + '/10');}}}
😀... hope this help.