HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Validation

01-28-2006, 02:39 PM#1
SmileyJeff
Went through the web but can't find a tutorial for this.
I stored 10 names into an array. Then i choose randomly to give computer's controlled units. But it appears that the name will be repeated, meaning that two or more heroes can share the same name. How do i check if the name is used, it won't be use again.

Smiley
01-28-2006, 02:46 PM#2
Blade.dk
Easiest way would probably be to set that part of the array to "", and then check when you should use the array if it's not "", and if it is, select a new part of the array, do this in a loop till you get the correct one.
Validation - Wc3C.net