You need to assign an id when using CreateCustomButton(), the function is overloaded [different required arguments] a few times to simplify one's life.
If you look at the function template, you'll see it goes like (x, y, def_name, custom_proc, normal_frame, clicked_frame)
When you use this version, then
id is assumed 0, and there are a lot of dialog items with id 0 !
Use the same version I did when creating safely (x, y,
ID, def_name, custom_proc, normal_frame, clicked_frame), and define your CheckBoxID.
- Код: Выделить всё
#define CheckBoxID 1234
SavingThis one is tricky.
Adding a value to GM* file is simple, and reading the value (need to modify load function as well) is also straight-forward.
But how do you distinguish a Freshmod save from a non-freshmod save?
If you read a value from the save file and it's not meant for you, the game can crash.
You also have to think about future, will there be more than one flag in the future?
You need a good plan here before moving ahead.
Net tradingGiven that I don't study multiplayer there are things I don't know, this is one of them!
Maybe
igrik knows
If not look through WoG source.
An alternative is to have spot checks for flag value through a hook somewhere.
You would also benefit from having a way to ensure connected players use Freshmod and the same version to solve some of these issues and prevent crashes.
(Again, don't know)