will it be eequal to?
#1

pawn Код:
if(GetPlayerName(playerid,Nam,sizeof(Nam)) == dini_Int(file1,"Member1"))
{
dini_Set(file1,"Member1",Nam);
}
I want to know that does the name of a certain player is same as the name written in file1 in the content "member1".
so on this stage will == will work? or it will cause a bug. if == will not work than what should i add?
Reply
#2

sorry delete it pls
Reply
#3

strcmp, plus the result from dini will be an int, you need to grab the string.
Reply
#4

I'm not familiar with Dini or how to retrieve it's data, but it should be something like this:]

pawn Код:
new string[24];
    new name[24];
    name = GetPlayerName(playerid,Nam,sizeof(Nam));
    format(string, sizeof(string), "%s",dini_Int(file1,"Member1"));
    if(strcmp(name, string, true) == 0)
    {

        dini_Set(file1,"Member1",Nam);
    }
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)