Hi,
It's past 3 in the morn and i'm still non the wiser for looking at post after post so...
My menu firstly....
Looks at a txt file, finds a string (the genre of game!!) and then I want to use a loop to store proceeding lines upto the gap (where the loop terminates), stroring the game name (each line!) in its own variable....
I would dodge in and out of a simple array in Java...
I'm just using a variable 'i' as a counter and finding it impossible to concat a string 'game' with the counter 'i' to form a variable. I can form a value easily.. but how does one change a value to a variable....
I hope this doesn't turn out as me being really thick..
My actions as they stand so far..
%GenreName% = "Trigga Hippy"
%GenreSel% = "Trig"
%LineNumber% = TextFile.FindLine ("%SrcDir%\Menu\Games.txt","%GenreName%", 0)
%i% = Evaluate (%LineNumber%+2)
WHILE (%i% < %LineCount% AND %spaceCount% < 2)
%curGame% = Evaluate (("%"+Game+%i%+"%"))
%i% = Evaluate ((%i%+1))
%tmpLineVal% = TextFile.GetLine ("%SrcDir%\Menu\Games.txt", %i%)
IF (%tmpLineVal% = " " OR %tmpLineVal% = "" OR %tmpLineVal% = " ")
%i% = Evaluate (%LineCount%)
END IF
ELSE
????????
something like
%(%curGame%)% = %tmpLineStr%
or
%("game"+%i%)% = %tmpLineStr%
This doesnt work...
help!!!!!!!
END WHILE
Page.Jump ("Genre")
--------------
%Game1% = Evaluate (("%"+%GenreSel%+"1"+"%"))
Above is this working sort of backwards I think..
but then, does it work with %i% instead of '1'???
Hope you understand what i'm barking on about, if anyone can help then thank you loads.
Cheers
Pete
PS.. What ever happened to my new year celebrations?
It's past 3 in the morn and i'm still non the wiser for looking at post after post so...
My menu firstly....
Looks at a txt file, finds a string (the genre of game!!) and then I want to use a loop to store proceeding lines upto the gap (where the loop terminates), stroring the game name (each line!) in its own variable....
I would dodge in and out of a simple array in Java...
I'm just using a variable 'i' as a counter and finding it impossible to concat a string 'game' with the counter 'i' to form a variable. I can form a value easily.. but how does one change a value to a variable....
I hope this doesn't turn out as me being really thick..
My actions as they stand so far..
%GenreName% = "Trigga Hippy"
%GenreSel% = "Trig"
%LineNumber% = TextFile.FindLine ("%SrcDir%\Menu\Games.txt","%GenreName%", 0)
%i% = Evaluate (%LineNumber%+2)
WHILE (%i% < %LineCount% AND %spaceCount% < 2)
%curGame% = Evaluate (("%"+Game+%i%+"%"))
%i% = Evaluate ((%i%+1))
%tmpLineVal% = TextFile.GetLine ("%SrcDir%\Menu\Games.txt", %i%)
IF (%tmpLineVal% = " " OR %tmpLineVal% = "" OR %tmpLineVal% = " ")
%i% = Evaluate (%LineCount%)
END IF
ELSE
????????
something like
%(%curGame%)% = %tmpLineStr%
or
%("game"+%i%)% = %tmpLineStr%
This doesnt work...
help!!!!!!!
END WHILE
Page.Jump ("Genre")
--------------
%Game1% = Evaluate (("%"+%GenreSel%+"1"+"%"))
Above is this working sort of backwards I think..
but then, does it work with %i% instead of '1'???
Hope you understand what i'm barking on about, if anyone can help then thank you loads.
Cheers
Pete
PS.. What ever happened to my new year celebrations?
Comment