Dev KhayZia AZ Posted February 1 Group: Members Topic Count: 7 Topics Per Day: 0.05 Content Count: 12 Reputation: 0 Joined: 11/22/24 Last Seen: March 23 Share Posted February 1 buildin_rand: range (0) is to small. No randomness possible .@mid = .Peco[rand(.size)]; setarray .Peco[0], 2811; .size = getarraysize(.Peco); Quote Link to comment Share on other sites More sharing options...
0 Start_ Posted February 1 Group: Members Topic Count: 26 Topics Per Day: 0.01 Content Count: 950 Reputation: 180 Joined: 04/05/13 Last Seen: 2 hours ago Share Posted February 1 You need at least 2 array to random. (1 will error like you post) 1 Quote Link to comment Share on other sites More sharing options...
0 Dev KhayZia AZ Posted February 1 Group: Members Topic Count: 7 Topics Per Day: 0.05 Content Count: 12 Reputation: 0 Joined: 11/22/24 Last Seen: March 23 Author Share Posted February 1 can you do it here 2 array Quote Link to comment Share on other sites More sharing options...
0 rokimoki Posted February 1 Group: Members Topic Count: 5 Topics Per Day: 0.00 Content Count: 75 Reputation: 11 Joined: 12/16/11 Last Seen: Monday at 09:14 PM Share Posted February 1 Just tell what you want and we can try to help you. If .size is initialized after the rand, it will rand(0), try this instead: .@mid = .Peco[rand(getarraysize(.Peco))]; // else where in the code OnInit: // inside the script but at end setarray .Peco[0], 2811; end; If size is 1, rand(1) will give 0, which is first position, no error must be shown. Quote Link to comment Share on other sites More sharing options...
Question
Dev KhayZia AZ
buildin_rand: range (0) is to small. No randomness possible
.@mid = .Peco[rand(.size)];
setarray .Peco[0], 2811;
.size = getarraysize(.Peco);
Link to comment
Share on other sites
3 answers to this question
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.