It's hard to say what's wrong without more details but this blog post should be helpful: Using R forecasting packages from Tableau | Bora Beran. It uses another package but does something pretty close to what you describe, parameters included.
Hope this helps!
Mine is different case in the above article which you shared was done for only one variable and i added extra variables in my model, so i am using tslm package for forecasting instead of regular ones. In forecasting data i need to have those values to be added for the forecasting.
You can pass more than one variable to R. In fact, in the blog, Bora is passing 2 values: one measure in yellow and one parameter in purple:
.argN, where N is an incremental number, is the syntax used to indicate Tableau to pass a value into whatever code we are executing on R. There's one difference between using a measure and a parameter in that on the latter you need to add  at the end of .argN.
In your case, if you need to add another measure or parameter, simply add .arg3 or arg3 in the R code, then add a correspondent measure/parameter after the code.
Resources I've found helpful when looking at this topic are:
a. How to Integrate R and Tableau (5-min video)
b. Using R within Tableau (5-min video)
c. Using R and Tableau: This whitepaper that covers mostly all of the content on the 2 videos above, with a few more details. I’ll look at this in case you prefer reading than watching the videos above.
d. Building Advanced Analytics Applications with R and Python Integration: 50-min webinar by Tableau’s lead on Advanced Analytics: Bora Beran.
e. On Anything Data: Bora’s blog which showcases many use cases of Tableau and R, along Tableau Workbooks that can be downloaded. I’d start from the oldest post to start, but then quickly jump at anything that calls your attention.