files, fuck files! but need them though.
#1

Код:
new name[MAX_PLAYER_NAME], string[48];
	GetPlayerName(clickedplayerid, name, sizeof(name));
	new plrIP[16];
	GetPlayerIp(clickedplayerid, name, sizeof(name));
	new IPtocompare[16];
	new File:vipinfo=fopen(name, io_write);
	if(fexist(name));//line 77
		{
		fopen(vipinfo, io_read); //line 79
		fread(vipinfo, IPtocompare, sizeof(IPtocompare), false);
		fclose(vipinfo);
		}
ma code.

i want it to create a file with a name that is the playername. and the file contains the ip.
this is kinda of a auto recognition system vor vips.
hope u can help me my errors are:
error 035: argument type mismatch (argument 1) in line 79
error 036: empty statement in line 77

thx in advance
Reply
#2

What i see on the script is that you get the players name and then overwrite it with the ip, you should make ip its own variable and store it there.
Reply
#3

DINI Imo Is alot easier than that :P

Rather than:

new File:vipinfo=fopen(name, io_write);

You'd have:

new file[128], name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof name);
format(file, sizeof file, "%s.ini", name);
if(!fexist(file))
{
dini_Create(file);
}
else if(fexist(file))
{
dini...
}
Reply
#4

pawn Код:
new name[MAX_PLAYER_NAME], string[48];
    GetPlayerName(clickedplayerid, name, sizeof(name));
    new plrIP[16];
    GetPlayerIp(clickedplayerid, name, sizeof(name));
    new IPtocompare[16];
    new File:vipinfo=fopen(name, io_write);
    if(fexist(name))//line 77, you put an ; after an if statement, BAD BOY! :(
        {
        vipinfo = fopen("Your_file_name_here.whateverextentionyouwant", io_read); //line 79
        fread(vipinfo, IPtocompare, sizeof(IPtocompare), false);
        fclose(vipinfo);
        }
Fixed.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)