Quantcast
Channel: VBForums
Viewing all articles
Browse latest Browse all 42215

Editing textfile with structure

$
0
0
I'm working on save editor program, but i've came into huge problem:
Here's structure in these textfile:
Code:

    owner="SOV"
    controller="SOV"
    core="SOV"
    infra={
 10.000 10.000    }
    industry={
 10.000 10.000    }
    points=0
    weather={
        humidity=7.584
        pressure=1015.000
        temperature=11.050
        precipitation=0.012
        cloud_coverage=0.006
    }
}

But, so that wouldnt be so simple, it can also be like:

Code:

    owner="USA"
    controller="USA"
    core="USA"
    naval_base={
 1.000 1.000    }
    infra={
 8.000 8.000    }
    points=0
    weather={
        pressure=1015.000
        temperature=21.700
        precipitation=0.012
        cloud_coverage=0.006
    }
}

Here's what the program should do:
- look for selected country (I'll use SOV as example)
So - look for core="SOV"
- then delete everything between
core="SOV" and points=0
- Add there
infra={
10.000 10.000 }
industry={
10.000 10.000 }

I really have NO idea how to make it. Thanks in advance.

Viewing all articles
Browse latest Browse all 42215

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>