ok now thats weird, i dont have to dim it or global it or move it and it works BUT theres another problem
Rem Project: TLE - Aliens
Rem Created: Saturday, December 26, 2009
Rem ***** Main Source File *****
GOSUB UDT
GOSUB GLOBALS
GOSUB GENNAME
GOSUB PRINTVAL
DO
RANDOMIZE TIMER()
IF SPACEKEY() = 1
GOSUB GENNAME
GOSUB PRINTVAL
ENDIF
LOOP
UDT:
TYPE tAliens
RaceName AS STRING
ENDTYPE
Alien AS tAliens
RETURN
GLOBALS:
GLOBAL MAXNAMES = 20
RETURN
PRINTVAL:
CLS
PRINT "Race Name: ", Alien.RaceName
RETURN
GENNAME:
INPUT "What is the name of this race(r for random): ", Alien.RaceName
IF Alien.RaceName = "r" OR Alien.RaceName = "R"
ROLLTMP = RND(MAXNAMES)
SELECT ROLLTMP
CASE 0
Alien.RaceName = "Churtran"
ENDCASE
CASE 1
Alien.RaceName = "Ct'Igeltazu"
ENDCASE
CASE 2
Alien.RaceName = "Romorkon"
ENDCASE
CASE 3
Alien.RaceName = "Mutzachua Rakilri"
ENDCASE
CASE 4
Alien.RaceName = "Chudin"
ENDCASE
CASE 5
Alien.RaceName = "Maront"
ENDCASE
CASE 6
Alien.RaceName = "I'Formorkon"
ENDCASE
CASE 7
Alien.RaceName = "T'Satadi"
ENDCASE
CASE 8
Alien.RaceName = "Danaski"
ENDCASE
CASE 9
Alien.RaceName = "Oni Sharialhoo"
ENDCASE
CASE 10
Alien.RaceName = "X'Kani"
ENDCASE
CASE 11
Alien.RaceName = "M'Zorgarot"
ENDCASE
CASE 12
Alien.RaceName = "Zan Sycizant"
ENDCASE
CASE 13
Alien.RaceName = "Boppp"
ENDCASE
CASE 14
Alien.RaceName = "Micrn"
ENDCASE
CASE 15
Alien.RaceName = "Sh'Byormeriim"
ENDCASE
CASE 16
Alien.RaceName = "Jarl"
ENDCASE
CASE 17
Alien.RaceName = "Hevasis"
ENDCASE
CASE 18
Alien.RaceName = "Helessup"
ENDCASE
CASE 19
Alien.RaceName = "Ninidi"
ENDCASE
CASE 20
Alien.RaceName = "Unned Gorini"
ENDCASE
ENDSELECT
ENDIF
RETURN
it generates a name the first time but every other time it shows up as r, im off to a really bad start here????
EDIT: I found out that its because when i press space to generate a new name it adds the space to the input, i fixed this by adding a wait command just after 'if spaecekey'