About The *rand Function


#1

I’m implimenting the use of *rand in my game, but when I do something like, say, *rand die_roll 1 2, it says die_roll isn’t a variable, so I inserted *create die_roll at the beginning of the game, and then it would tell me rand was not a variable, so I then put *create rand at the beginning of the game, and it told me “rand exists, but has no value”.
So how do I fix this? Did the command for *rand change suddenly? I’m using the latest version of Choicescript, if that makes a difference.


#2

Put die_roll in the stats in game.js

Then

*rand die_roll 1 2

Should work.


#3

Yes that works i use it in my demo


#4

@Nocturnal_Stillness & @MaraJade
Thanks for the help, it’s working perfectly now.