misc.c clean source (from github) errors

  • Ranga179
    27th Sep 2011 Member 0 Permalink
    hi,
    i am compiling a clean source to see if i set it up right and there are only a couple of errors witch both relate to the same line.
    the errors are as follows:


    C:\Users\Alex\Desktop\mod\src\misc.c||In function 'save_presets':|
    C:\Users\Alex\Desktop\mod\src\misc.c|140|error: 'MAJOR_VERSION' undeclared (first use in this function)|
    C:\Users\Alex\Desktop\mod\src\misc.c|140|note: each undeclared identifier is reported only once for each function it appears in|
    ||=== Build finished: 2 errors, 0 warnings ===|


    --and this is the contents in and around line 140--
    *line 120 - 149*

    void save_presets(int do_update)
    {
    FILE *f=fopen("powder.def", "wb");
    unsigned char sig[4] = {0x50, 0x44, 0x65, 0x68};
    unsigned char tmp = sdl_scale;
    if (!f)
    return;
    fwrite(sig, 1, 4, f);
    save_string(f, svf_user);
    //save_string(f, svf_pass);
    save_string(f, svf_user_id);
    save_string(f, svf_session_id);
    fwrite(&tmp, 1, 1, f);
    tmp = cmode;
    fwrite(&tmp, 1, 1, f);
    tmp = svf_admin;
    fwrite(&tmp, 1, 1, f);
    tmp = svf_mod;
    fwrite(&tmp, 1, 1, f);
    save_string(f, http_proxy_string);
    tmp = MAJOR_VERSION;
    fwrite(&tmp, 1, 1, f);
    tmp = MINOR_VERSION;
    fwrite(&tmp, 1, 1, f);
    tmp = BUILD_NUM;
    fwrite(&tmp, 1, 1, f);
    tmp = do_update;
    fwrite(&tmp, 1, 1, f);
    fclose(f);
    }


    i have no idea why it is like this as i have not moded the source in any files or any way.
    thx in advance!
  • Simon
    27th Sep 2011 Administrator 0 Permalink
    Oops, replace MAJOR_VERSION with SAVE_VERSION
  • Ranga179
    27th Sep 2011 Member 0 Permalink
    why thankyou, almighty Simon.
    it now works :)
  • Jackeea
    27th Sep 2011 Banned 0 Permalink
    This post is hidden because the user is banned
  • Ranga179
    27th Sep 2011 Member 0 Permalink