Small help with my command.
#1

Fixed!
Reply
#2

Can you show ur pName stock function?

Try this too:
PHP код:
if(strcmp(cmd"/clearaka"true) == 0)
    {
        if(
AccInfo[playerid][Level] >= 1)
        {
            if(!
strlen(params)) return
            
SendClientMessage(playeridLIGHTBLUE"[ USAGE: /clearaka (player<name/id>) ]") &&
            
SendClientMessage(playeridLIGHTBLUE2"[ FUNCTION: Will clear the AKA of the specified player. ]");
            new 
player1 strval(params);
            if(
AccInfo[player1][Level] == ServerInfo[MaxAdminLevel] && AccInfo[playerid][Level] != ServerInfo[MaxAdminLevel])
                return 
SendClientMessage(playerid,red,"[ ERROR: You cannot use this command on this admin. ]");
            if(
IsPlayerConnected(player1) && player1 != INVALID_PLAYER_ID)
            {
                new 
tmp3[100], file[100], file1[100], Name[25];
                
GetPlayerName(playeridNamesizeof(Name));
                
GetPlayerIp(player1,tmp3,50);
                
format(file,sizeof(file),"/Database/Config/aka.txt");
                
SendCommandToAdmins(playerid,"clearAKA");
                
dini_IntSet(file1,tmp3,Name);//This is where I get an error.
                
return 1;
            }
            else return 
ErrorMessages(playerid2);
        }
        else return 
ErrorMessages(playerid1);
    } 
Reply
#3

Fixed!
Reply
#4

This error occurs, because you want to set an integer value but player name is a string and not an integer
Reply
#5

Fixed!
Reply
#6

Hello!

PHP код:
dini_IntSet(file1,tmp3,Name); 
to
PHP код:
dini_Set(file1,tmp3,pName(playerid)); 
Reply
#7

Fixed!
Reply
#8

No you don't have it.

PHP код:
dini_IntSet 
and
PHP код:
dini_Set 
Reply
#9

Show me the stock/function that add names to the file.
Reply
#10

Fixed!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)