Problem | file Functions
#1

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:

PHP код:
        new File:gPass fopen(file(playerid), io_read);
        
fread(gPass"Password"); 
and :

PHP код:
if(!strcmp(inputtext,fread(gPass"Password"), true)) 
But I get ERROR :

PHP код:
C:\Users\Intel\Desktop\MyServer\gamemodes\NewMode.pwn(237) : error 035argument type mismatch (argument 2
I start with the file and I do not see the problem?
Plese Help me !
Reply
#2

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
pawn Код:
while(fread(file, buffer))
{
    //Compare here the buffer array with your constant string.
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)