Change ip in Queue Simple, from / ip neighbor address while identity = name

Hello, I am new to this scripting, I need to make a script that takes the address and identity from ip neighbor, save them in 2 variables, look for the identity match with the name of queue simple and assign the target to the variable with the address .

Help Please

:local host;
/ip neighbor
 	:for i from=227 to= 229 do =  {
 		:if ([/ip neighbor find address=("10.254.0." . $i)] != "") do={
 			:set host [get [find address("10.254.0." . $i)] indentity]
			/queue simple
 			:if ([/queue simple find name=$host] != "") do={
 				set [find name=$host] target=("10.254.0." . $i)
 			}
 		}
}