Doesn't load further files(.ini)(What the hell!?)
#1

{Solved] Removed the code cuz of a change of being copied.

FILE: ACCOUNT Loads perfectly with the values,BUT THE LEVEL I tried EVERYTHING I CAN TO LOAD LEVEL FILE AND IT DOESN't LOAD, i tried doing same like loading account, i tried powerini, i tried mxini, i tried SII, i even tried djSON Nothing helps to load it, what could be f***ing wrong? It's getting on my nerves
Reply
#2

I had this same problem.. btw, Im still having this stupid problem, but I've figured a small solution: Leave the first line of the file empty and once a new account gets created, write an empty line in it with fwrite(filename, "\r\n") just to make sure it doesnt happen with other accounts. Example with dini:
pawn Код:
stock dini_Create(filename[])
{
  if(fexist(filename)) return false;
  new File:fhnd;
  fhnd = fopen(filename, io_write);
  if(fhnd)
  {
    fwrite(fhnd, "\r\n"); //Here
    fclose(fhnd);
    return true;
  }
  return false;
}
It may sometimes write "я" on the first line and I have no idea where the heck it comes from.
Reply
#3

still doesn't load a sh**, if you didn't catch it it doesn't even load ANY OF THOSE except for account file..
Reply
#4

oh.. so I doesnt load the level-file..? Make something Like this..
pawn Код:
SendClientMessage(playerid, WHITE, "Message 1");
if (account)
{
  SendClientMessage(playerid, WHITE, "Message 2");
  if (!strcmp("Slaptazodis", passres))
  {
    ...
  }
  if (strcmp(playerDB[playerid][Slaptazodis], slaptazodis, false))
  {
    SendClientMessage(playerid, WHITE, "Message 3");
    while (fread(account, pass, 256))
    {
      ...
    }
  }
  else
  {
    ...
    return 1;
  }
  SendClientMessage(playerid, WHITE, "Message 4");
  format(str, sizeof str, "/fAccounts/Stats/%s.ini", name);
  new File:level = fopen(str, io_read);
  if (level)
  {
    ...
    SendClientMessage(playerid, WHITE, "Message 5");
    if( strcmp( keytmp , "Slaptazodis" , true ) == 0 )
    {
      ...
    }
    if(strcmp(playerDB[playerid][Slaptazodis],slaptazodis, true ) == 0 )
    {
      SendClientMessage(playerid, WHITE, "Message 6");
      while ( fread( level , Data , sizeof( Data ) ) )
      {
        ...
      }
    }
    SendClientMessage(playerid, WHITE, "Message 7");
  }
  SendClientMessage(playerid, WHITE, "Message 8");
}
..and see where it gets stuck, maybe that will help.
Reply
#5

Umh, it doesn't load the FILE:level, and after level is done loading, file:Weapon both of them doesn't load but below all of them there are msgs,gametexts and stuff like that which shows, whatever i just replaced everything with DUDB and works perfectly!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)