daveconor 1 Posted June 16, 2013 Report Share Posted June 16, 2013 So I'm trying to to spin text with 3 different variables using $spin ex: {My {#variable1} | Your {#variable2} | His {#variable3}} It seems like having curly braces within curly braces is breaking the variable so it shows as text ex: your #variable or His #variable would appreciate any help, thanks Quote Link to post Share on other sites
danoctav 7 Posted June 16, 2013 Report Share Posted June 16, 2013 I have just tried this piece of code and it works ! No problem with curly braces : set(#variable1, "car", "Global") set(#variable2, "house", "Global") set(#variable3, "tv", "Global") set(#spinned_text, $spin("\{My {#variable1}|Your {#variable2}|His {#variable3}\}"), "Global") ui stat monitor("Spinned text:", #spinned_text) Quote Link to post Share on other sites
daveconor 1 Posted June 16, 2013 Author Report Share Posted June 16, 2013 I have just tried this piece of code and it works ! No problem with curly braces : set(#variable1, "car", "Global") set(#variable2, "house", "Global") set(#variable3, "tv", "Global") set(#spinned_text, $spin("\{My {#variable1}|Your {#variable2}|His {#variable3}\}"), "Global") ui stat monitor("Spinned text:", #spinned_text) thanks for the reply but I've tried that and the results are not consistent if you mess around with $spin too much, ex: click to edit $spin and then hit ok after your done, it will sometimes break the variables inside, its wierd. Still looking for a solution Quote Link to post Share on other sites
VaultBoss 310 Posted June 16, 2013 Report Share Posted June 16, 2013 You have the option to drag'n'drop the variables in Node View (which will let UBS to take care of the escaping for the curly brackets where needed,or else,when in Code view, you have to make sure that the curlies from the $spin command ARE escaped, while the ones surrounding the variable names are not <<< as clearly depicted by danoctav's code...while obviously, yours is wrong. Quote Link to post Share on other sites
daveconor 1 Posted June 16, 2013 Author Report Share Posted June 16, 2013 You have the option to drag'n'drop the variables in Node View (which will let UBS to take care of the escaping for the curly brackets where needed,or else,when in Code view, you have to make sure that the curlies from the $spin command ARE escaped, while the ones surrounding the variable names are not <<< as clearly depicted by danoctav's code...while obviously, yours is wrong. I have done it in node view (dragging them over) but like I said, it breaks the variables if I open to edit and save, as for code view, I dont have pro. Any other ideas? thanks Quote Link to post Share on other sites
daveconor 1 Posted June 16, 2013 Author Report Share Posted June 16, 2013 Well I found a way to get it done, if I save the changes I made in $spin by pressing the ok button it will break the variables inside BUT, if I leave it open and instead press ok on the node inwhich the $spin node is located, it will save the changes and wont break the variables 1 Quote Link to post Share on other sites
dankass 52 Posted June 29, 2013 Report Share Posted June 29, 2013 Well I found a way to get it done, if I save the changes I made in $spin by pressing the ok button it will break the variables inside BUT, if I leave it open and instead press ok on the node inwhich the $spin node is located, it will save the changes and wont break the variables I can confirm this is the way it is... something is screwy when editing the spin function itself when you hit ok, but as he says, if you first edit the "set" command (or wherever it is being used) and then edit the spin function, and click the ok on the "set" node it works. this is clearly a bug in ubot node view... if you will notice daveconor only has standard version and unable to edit at the code level so this becomes a pretty big issue when node view is not properly formatting the syntax. 1 Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.