Example of config file using Reflection

About Monkey 2 Forums Monkey 2 Development Example of config file using Reflection

This topic contains 1 reply, has 2 voices, and was last updated by  nerobot 2 years, 4 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #5759

    peterigz
    Participant

    I just converted some code from Blitzmax that uses Reflection. This is a convenient way of saving config files for things like player controls, screen resolutions and other things you want to keep persistent. Just extend config, add your config fields and use save and load. It’s pretty basic with not much error checking (should players try hacking your config) and only accepts Int, String and Floats but it’s a little starting point and real world usage example if you haven’t tried reflection yet.

    #5767

    nerobot
    Participant

    Good. But only single line strings worked with that plain-text.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.