Overwatch-Script-To-Workshop icon indicating copy to clipboard operation
Overwatch-Script-To-Workshop copied to clipboard

Unable to set player variable on a filtered array of players

Open SlenderFox opened this issue 8 months ago • 2 comments

Attempting to set the player variable on a filtered array of players yields the error "No variable by the name of 'variable name' exists in the current scope."

e.g.

playervar Number A;
playervar Number B;

rule: "Example"
{
	FilteredArray(AllPlayers(), ArrayElement().A > 5).B = 5;
}

Error: "No variable by the name of 'B' exists in the current scope."

Of course in this example you could set the rule to be OnGoingPlayer, however in a different situation this wouldn't be possible/reasonable.

SlenderFox avatar Jun 16 '24 10:06 SlenderFox