Cleaned from bad syntax (you have more than those 2 mentioned above):
Code:
:local new-address
:local status
:local x
:set x 2
:for i from=1 to=$x do={
:set status [/interface get [/interface find name="ppoe"] running]
:if ($status=true) do={
:set new-address [/ip address get [/ip address find dynamic=yes interface="ppoe"] address]
:set new-address [:pick $new-address 0 ([:len $new-address] -3)]
/ip firewall nat set [/ip fir nat find comment=$i] to-addresses=$new-address
}
}
Notice: "[:pick $new-address 0 ([:len $new-address] -3)]" - how do you know the last number in ip address will have 3 digits?
interface name "ppoe" is questionable (did you type it right, the correct spelling is "pppoe"
Avoid for x from... at all costs - that causes only problems