files, fuck files! but need them though. - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: files, fuck files! but need them though. (
/showthread.php?tid=141011)
files, fuck files! but need them though. -
legodude - 11.04.2010
Код:
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
Re: files, fuck files! but need them though. -
Winded - 11.04.2010
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.
Re: files, fuck files! but need them though. -
Torran - 11.04.2010
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...
}
Re: files, fuck files! but need them though. -
biltong - 11.04.2010
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.