Procedure how do you call it?
Posted: Thu Jun 16, 2005 5:04 pm
how do you call a procedure mines
procedure charRace (var str, agi, vit, wiz : int)
var choice : int
put "Pick your Race."
put " "
put "1-Human (Str: 15 Agi:15 Vit:15 Wiz:15)"
put " "
put "2-Night elf (Str: 15 Agi:20 Vit:10 Wiz:15)"
put " "
put "3-Orc (Str: 20 Agi:10 Vit:20 Wiz:10)"
put " "
put "4-Undead (Str: 10 Agi:10 Vit:20 Wiz:20)"
get choice
if choice = 1 then
race := "Human"
str := 15
agi := 15
vit := 15
wiz := 15
elsif choice = 2 then
race := "Night Elf"
str := 15
agi := 20
vit := 10
wiz := 15
elsif choice = 3 then
race := "Orc"
str := 20
agi := 10
vit := 20
wiz := 10
elsif choice = 4 then
race := "Undead"
str := 10
agi := 10
vit := 20
wiz := 20
end if
end charRace
but how do i call it i tryed just
charRace
but that doesnt work
Archived topic from Iceteks, old topic ID:3411, old post ID:27455
procedure charRace (var str, agi, vit, wiz : int)
var choice : int
put "Pick your Race."
put " "
put "1-Human (Str: 15 Agi:15 Vit:15 Wiz:15)"
put " "
put "2-Night elf (Str: 15 Agi:20 Vit:10 Wiz:15)"
put " "
put "3-Orc (Str: 20 Agi:10 Vit:20 Wiz:10)"
put " "
put "4-Undead (Str: 10 Agi:10 Vit:20 Wiz:20)"
get choice
if choice = 1 then
race := "Human"
str := 15
agi := 15
vit := 15
wiz := 15
elsif choice = 2 then
race := "Night Elf"
str := 15
agi := 20
vit := 10
wiz := 15
elsif choice = 3 then
race := "Orc"
str := 20
agi := 10
vit := 20
wiz := 10
elsif choice = 4 then
race := "Undead"
str := 10
agi := 10
vit := 20
wiz := 20
end if
end charRace
but how do i call it i tryed just
charRace
but that doesnt work
Archived topic from Iceteks, old topic ID:3411, old post ID:27455