File Reading - 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: File Reading (
/showthread.php?tid=224941)
File Reading -
Criss_Angel - 12.02.2011
pawn Код:
new read[11], filename[56], string[55];
format(filename, sizeof(filename),"Players/%s.ini", name);
fopen(filename, io_read);
fread(filename, string);
It wont work, gives argument mismatch in all of em whats the issue?
Re: File Reading -
Hiddos - 12.02.2011
Files are assigned an ID which you use to work with:
pawn Код:
new read[11], filename[56], string[55];
format(filename, sizeof(filename),"Players/%s.ini", name);
new File:file = fopen(filename, io_read);
fread(file, string);
Re: File Reading -
Grim_ - 12.02.2011
Too late
Re: File Reading -
Criss_Angel - 12.02.2011
what about this?
pawn Код:
new filename[55], string[250];
format(filename, sizeof(filename),"Players/%s.ini", name);
new File:user = fopen(filename, io_write); // Open the file
fopen(user, io_write);
format(string, sizeof(string),"%s %s 0 0 0 299 0 0 0 255 1 0",name, inputtext);
fwrite(user, string);
fclose(user);
Re: File Reading -
Criss_Angel - 12.02.2011
Nvm, Fixed it

But i can this error:
Код:
C:\Users\Administrator\Documents\SAMP 0.3b\gamemodes\WSRPG.pwn(1078) : error 033: array must be indexed (variable "inputtext")
on this:
whats so wrong with it?
Re: File Reading -
Criss_Angel - 13.02.2011
24 Hour Bump, Please Help I tried configuring myself will this work:
pawn Код:
if(read[1] == strval(inputtext))
Thanks...