examples: Games: RobotFindsKitten: reading localized nkis.txt if exists
This commit is contained in:
parent
b7b5cbfe31
commit
3b563c1f64
1 changed files with 7 additions and 1 deletions
|
@ -94,12 +94,18 @@ Public Sub Form_Open()
|
|||
Dim nkitext As String[]
|
||||
NKIs = New Object[]
|
||||
nkitext = New String[]
|
||||
Dim sLanguage As String
|
||||
|
||||
Randomize
|
||||
origheight = Me.height
|
||||
origwidth = Me.width
|
||||
origfontsize = 12
|
||||
Try nkistring = File.load("nkis.txt")
|
||||
sLanguage = Left$(System.Language, 2)
|
||||
Try nkistring = File.load("nkis_" & sLanguage & ".txt")
|
||||
If Error Then
|
||||
Try nkistring = File.load("nkis.txt")
|
||||
Endif
|
||||
|
||||
nkitext = Split(nkistring, "\n")
|
||||
KittenisFound = False
|
||||
numnkis = 20
|
||||
|
|
Loading…
Reference in a new issue