I have a big list of word, that I'm choosing with tokenat.
At the end I need 4 DIFFERENT words taken at random from that list.
The way I'm doing it:
global list = "bread,table,spoon,cat,dog,house";
local tmp_current = "";
Set tmp_current to tokenat( list , floor( random( tokenCount(list ,",") ) ), "," );
Set list to replace( Emotions_unset, tmp_current &",", "" );
Set list to replace( Emotions_unset, tmp_current, "" );
Set text1 to tmp_current;
---
Set tmp_current to tokenat( list , floor( random( tokenCount(list ,",") ) ), "," );
Set list to replace( Emotions_unset, tmp_current &",", "" );
Set list to replace( Emotions_unset, tmp_current, "" );
Set text2 to tmp_current;
--- repeat for all text
I don't think is an elegant solution and it give errors sometimes (like double commas) is there an easier (and safer) way to do something like this?