problem with DINI
#1

i have this command:
pawn Код:
if (strcmp(cmd, "/s", true) == 0)
 {
 if(PlayerInfo[playerid][pAdmin] < 3) return DenyMessage(playerid, 3);
 if(dini_Exists("SavesPositions.txt")){
    dini_Create("SavesPositions.txt");
    }
 tmp = strtok(cmdtext, idx);
 if(!strlen(tmp))
 SendClientMessage(playerid,COLOR_WHITE,"/s [1-200]");
 SendClientMessage(playerid,COLOR_WHITE,"This command is saving a position,every position that you want");
  SendClientMessage(playerid,COLOR_WHITE,"its help the admins+players go to places faster");
  SendClientMessage(playerid,COLOR_WHITE,"the position number must be between 1 to 200");
   SendClientMessage(playerid,COLOR_WHITE,"The positions will save in a file forever,unless you change/delete the position");
 positionnum = strval(tmp);
  if(positionnum < 0||positionnum >200) return SendClientMessage(playerid,COLOR_WHITE,"Warning!: Position must be 1-200!");
 new Float:Pos[MAX_PLAYERS][4];
    GetPlayerPos(playerid,Pos[playerid][0], Pos[playerid][1], Pos[playerid][2], Pos[playerid][3])
    dini_IntSet("SavesPositions.txt", "Pos[playerid][0]");
    dini_IntSet("SavesPositions.txt", "Pos[playerid][1]");
    dini_IntSet("SavesPositions.txt", "Pos[playerid][2]");
    dini_IntSet("SavesPositions.txt", "Pos[playerid][3]");
 }
 return 1;
  }
and im scared it wont work,so is it gonna work or what
and if it gonna work i think if i will save a position (no matter which of them) it will set all the positions to the number that i said
how to fix that

-----------------------
please explain me also what did you fixed so i will learn in the next time
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)