Basically I need a model I can edit and change for a game I am making. I have the following text
TileName = "SpaceFULL"
I have the variables TileType, SectorName, COx and COy.
I need a code which will find the text "[Sector=" + sectorname.tostring in the file and will record the line number in a variable. It will then continue until it finds the [End] (which applies to the Sector) and will record the line number in another variable.
Then it will take the start line number and search for "["cox + "," + coy + "]" ([0,0]) until the end line number, if the text is found is will record the start line and end line in the variables. It will now goto the TileName line and the variable TileType equels the text within the speech marks. If [0,0] was not found it will set TileType as "EnergyFULL"
I hope I have made myself clear in what I want.
Thanks for any help
Edited by PlyPencil, 26 September 2008 - 03:47 PM.