I currently have a timer set up to interact with a pet every 10 minutes. They recently added items expand how you do so that I would like to add to the timer. Currently I have the timer set up with:
local commands = { "train ", "play ", "pat " }
Send ( commands [ math.random (#commands) ] .. GetVariable("Pet") )
They added a ball, stuffed toy, and a frisbee. The commands I would need to use is "train @Pet with ball|toy|frisbee" but I the other two commands play and pat would need to remain the same. I tried changing the local commands to:
local commands = { "train (GetVariable("Pet") with frisbee", "play (GetVariable("Pet")", "pat (GetVariable("Pet")" }
But I would get the error:
Compile error
World: Primary
Immediate execution
[string "Timer: "]:1: '}' expected near 'Pet'
I'm not sure how I would go about changing the timer to accomplish this.
local commands = { "train ", "play ", "pat " }
Send ( commands [ math.random (#commands) ] .. GetVariable("Pet") )
They added a ball, stuffed toy, and a frisbee. The commands I would need to use is "train @Pet with ball|toy|frisbee" but I the other two commands play and pat would need to remain the same. I tried changing the local commands to:
local commands = { "train (GetVariable("Pet") with frisbee", "play (GetVariable("Pet")", "pat (GetVariable("Pet")" }
But I would get the error:
Compile error
World: Primary
Immediate execution
[string "Timer: "]:1: '}' expected near 'Pet'
I'm not sure how I would go about changing the timer to accomplish this.