I need help with that script

hello everyone here i need help with that script
the Idea is :
Linking many MACs in one card when its login in hotspot and if anyone have another MAC he can’t login

this is the code

:global AllowMac [:toarray (“F8:95:C7:EB:38:B7”,“C4:D9:87:19:71:3E”)];

:foreach user in=[/ip hotspot active find user=S.R] do={

:local username [/ip hotspot active get $user user];
:local mac [/ip hotspot active get $user mac-address];
:local ads [/ip hotspot active get $user address];

:for i from=0 to=([:len $AllowMac]-1) do={

if ($mac = [:pick $AllowMac $i]) do={

/ip hotspot active login user=S.R password=S.R mac-address=$mac ip=$ads ;
:error exit-loop
} else= {
/ip hotspot active remove numbers=[find where user=S.R]
/ip hotspot cookie remove [find mac-address =$mac]
:error exit-loop
}

}
}