you don't actually need the []'s when you use /set or /var, only when trying to access the contents of that variable later. If you do

var %z. $+ %i = 1

it will work just fine, as would

set %z. $+ %i 1