View Full Version : Problem | file Functions

15/03/2012, 01:28 PM
Hello samp forum !,
my name is Dan and i have problem .

So I started a register System for my mode
and i scripting system System With include file
Now I have a problem with taking Password
I did like this:

new File:gPass = fopen(file(playerid), io_read);
fread(gPass, "Password");

and :

if(!strcmp(inputtext,fread(gPass, "Password"), true))

But I get ERROR :

C:\Users\Intel\Desktop\MyServer\gamemodes\NewMode. pwn(237) : error 035: argument type mismatch (argument 2)

I start with the file and I do not see the problem?
Plese Help me !

15/03/2012, 01:49 PM
This is actually not a SA:MP bug.
Post here your problem: http://forum.sa-mp.com/forumdisplay.php?f=12

Anyways fread will not return a string. You have to loop through your whole file by using while(fread(file, buffer))
//Compare here the buffer array with your constant string.