Me need help to create .ini file

Results 1 to 4 of 4
  1. #1
    Account Upgraded | Title Enabled! ponteleymon is offline
    MemberRank
    Jan 2013 Join Date
    276Posts

    Me need help to create .ini file

    help make the correct file 1 on the source code of the server

    void Teleport::LoadTeleports()
    {
    this->t_num = 0;
    FILE* mFile;
    fopen_s(&mFile,Move,"r");
    char Linha[1024];
    int map,x1,x2,y1,y2,xp,Vip,lvl,zen;


    if(mFile == 0)
    {
    MessageBox(0, "Movereq.ini Not Found!", "Error.", MB_OK | MB_ICONSTOP);
    ExitThread(0);
    return;
    }


    while(!feof(mFile))
    {
    fgets(Linha, 1024, mFile);
    if(!strcmp(Linha, "end"))
    break;


    if(Linha[strlen(Linha) - 1] == '\n' || Linha[strlen(Linha) - 1] == '\r')
    {
    if(Linha[0] != '/' || Linha[1] != '/')
    {
    if(t_num > MAX_TELEPORT_NUMBER)
    {
    MessageBoxA(NULL,"Error reading teleport file, max /n\number of moves overflowed!","Fatal Error",NULL);
    ExitThread(0);
    }
    char *rest;
    strcpy_s(t_struct[this->t_num].t_Name, 30, strtok_s(Linha, " ", &rest));
    sscanf_s(rest, "%d %d %d %d %d %d %d %d ",&map,&x1,&y1,&x2,&y2,&lvl,&Vip,&zen);
    t_struct[this->t_num].map = map;
    t_struct[this->t_num].x1 = x1;
    t_struct[this->t_num].x2 = x2;
    t_struct[this->t_num].y1 = y1;
    t_struct[this->t_num].y2 = y2;
    t_struct[this->t_num].Vip = Vip;
    t_struct[this->t_num].Money = zen;
    t_struct[this->t_num].MinLevel = lvl;
    t_num++;
    }
    }
    }
    fclose(mFile);
    }


  2. #2

  3. #3
    (づ。◕‿‿◕。) Natzugen is offline
    MemberRank
    Jun 2014 Join Date
    ElbelandLocation
    1,858Posts

    Re: Me need help to create .ini file

    do you even understand what you are trying to add? its pretty explained in this lines the structure of the config file

    Code:
    t_struct[this->t_num].map = map;
    t_struct[this->t_num].x1 = x1;
    t_struct[this->t_num].x2 = x2;
    t_struct[this->t_num].y1 = y1;
    t_struct[this->t_num].y2 = y2;
    t_struct[this->t_num].Vip = Vip; 
    t_struct[this->t_num].Money = zen;
    t_struct[this->t_num].MinLevel = lvl;

  4. #4
    Account Upgraded | Title Enabled! ponteleymon is offline
    MemberRank
    Jan 2013 Join Date
    276Posts

    Re: Me need help to create .ini file

    Quote Originally Posted by natzugen View Post
    do you even understand what you are trying to add? its pretty explained in this lines the structure of the config file

    Code:
    t_struct[this->t_num].map = map;
    t_struct[this->t_num].x1 = x1;
    t_struct[this->t_num].x2 = x2;
    t_struct[this->t_num].y1 = y1;
    t_struct[this->t_num].y2 = y2;
    t_struct[this->t_num].Vip = Vip; 
    t_struct[this->t_num].Money = zen;
    t_struct[this->t_num].MinLevel = lvl;
    I did so but still the problem is there is an error "Movereq.ini Not Found!"!!!
    I did not change the way it is still the same, it may then need to add the file .ini?



Advertisement