auto.rsc Script for hotspot user

Hi, I’m new to scripting and can’t resolve a problem with mikrotik. I’m making hotspot that need to run some commands from server etc.. so I wrote down simple script (it’s a basicly “do command script” ) to make a new user in hotspot

:do { /ip hotspot user add limit-uptime=1m name=user password=user123 server=Htospot }

and when I run it from winbox system->script it works fine, adds new user with all the information, but problem occurs when I make auto.rsc file with the same command and when I import script trough FTP I get log message
“expected end of command (line 1 column 17)”

Can’t figure it out, why is it working trough the winbox but won’t work trough the FTP auto.rsc import.

Thanks

First set name of script file like this something.auto.rsc .
Then
into the script file best rule like this :
/ip hotspot user add limit-uptime=1m name=user password=user123 server=Htospot ;
without " do { } " .

be sure your user have write policies