SA-MP Forums Archive
dof2 cant read chars like [ and ] - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: dof2 cant read chars like [ and ] (/showthread.php?tid=599644)



dof2 cant read chars like [ and ] - ben4uka - 28.01.2016

hi there
i made my register system to work like this:
files creating with numbers (%d.ini, aka 1.ini, 2.ini etc..)
then its adding on a file called UsersList.ini this information:
Users = (number of registered users on server)
User1 = 1
User2 = 2
User3 = 3
etc..

Now the problem is if im registering a name with a tag like [tag]testuser1
it will ask me to register every time when im joining in, and if im registering a name testuser1 or (tag)testuser1 it will work and will ask to login after the first time.
this is the code i made to check if the name is registered:

pawn Код:
stock GetPlayerFirstTimeJoin(playerid)
{
    new number;
    new xp[128];
    format(xp, sizeof xp, "ExDM/Users/UsersList.ini");
    if(DOF2_IsSet(xp,GetName(playerid)))
    {
        number = DOF2_GetInt(xp,GetName(playerid));
        PlayerNumber[playerid] = number;
    }
    return number;
}

and on OnPlayerConnect:

pawn Код:
if(DOF2_IsSet("ExDM/Users/UsersList.ini", GetName(playerid)))
{
    printf("file found");
}
else
{
printf("no file found");
}
As i think, DOF2 does not support [ and ] while i tested it with dini and it works.

help?


Re: dof2 cant read chars like [ and ] - ben4uka - 29.01.2016

*bump*

cant manage to fix it.. any help?


Re: dof2 cant read chars like [ and ] - BiosMarcel - 29.01.2016

How bout u use smth like the playerfile has the players name, that would at least make sense


Re: dof2 cant read chars like [ and ] - ben4uka - 29.01.2016

Quote:
Originally Posted by [Bios]Marcel
Посмотреть сообщение
How bout u use smth like the playerfile has the players name, that would at least make sense
I dont want it like that.. It was with playername.ini, but i have my own reason to do it as %d.ini