naf4ever
Dread Lord
My program gets all cities in range of the the player then if certain ones meet a criteria it appends them to a list. I then want to pick a random city off that list. So far Ive done this:
It doesnt give me any errors but it doesnt quite return a random city either. It seems to always return back the first city i founded which i guess means an integar value of 0. Then if that one stops meeting the criteria and gets bumped off the list it will always return back the second city i founded, then the third,,, etc... How can i make it choose a random city off my list and not go in order?
Code:
iRandCity = CyGame().getSorenRandNum(len(listpTowns), "Bob")
It doesnt give me any errors but it doesnt quite return a random city either. It seems to always return back the first city i founded which i guess means an integar value of 0. Then if that one stops meeting the criteria and gets bumped off the list it will always return back the second city i founded, then the third,,, etc... How can i make it choose a random city off my list and not go in order?