[Close]
Welcome to SmG Gaming Community!
You're browsing our website as a Guest.
In order to view all of our content as well as added bonus features, please register by clicking HERE.
first off, dont return 0 from your randomgen function, and dont use global variables to store your random number. just return the randomcid from the randomgen function. then in your for loop, you are going to have to have an embedded for loop to check to see if the randomcid appears anywhere in the array. if it does you will have to generate a new one, otherwise you can use it. also when declaring your array, make all indexes that you dont want to use 0, that way you can tell if it has been assigned or not, as your randomgen will not produce a 0.
Do not meddle in the affairs of Dragons, for you are crunchy and taste good with ketchup!