SA-MP Forums Archive
FEXIST problem. Please help! - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Server (https://sampforum.blast.hk/forumdisplay.php?fid=6)
+--- Forum: Server Support (https://sampforum.blast.hk/forumdisplay.php?fid=19)
+--- Thread: FEXIST problem. Please help! (/showthread.php?tid=441473)



FEXIST problem. Please help! - VIZ3N - 03.06.2013

Hello i cant compile my GM. heres the code and the problem.

on GameModeInit
Quote:

new File:totalAccount=fopen("/BuGliCH/total/totalAccount.ini", io_write);
if(!fexist(totalAccount)
{
fwrite(totalAccount, "total accounts = 0");
fclose(totalAccount);
}

PAWNO Result:

Quote:

C:\Users\Manu\Desktop\SAMP\gamemodes\TEST1.pwn(301 ) : error 035: argument type mismatch (argument 1)
C:\Users\Manu\Desktop\SAMP\gamemodes\TEST1.pwn(152 93) : warning 217: loose indentation
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.

*Line 301 is: if(!fexist(totalAccount)

Please Help! Thanks


Re: FEXIST problem. Please help! - Pillhead2007 - 03.06.2013

Код:
new File:totalAccount=fopen("/BuGliCH/total/totalAccount.ini", io_write);
if(fexist(totalAccount)
{
fwrite(totalAccount, "total accounts = 0");
fclose(totalAccount);
}
try this


AW: FEXIST problem. Please help! - ZaakWest - 03.06.2013

strcmp is for comparing strings, not integers.
Код:
new File:totalAccount=fopen("/BuGliCH/total/totalAccount.ini", io_write);
if(fexist(totalAccount)
{
fwrite(totalAccount, "total accounts = 0");
fclose(totalAccount);
}}
There.


Re: AW: FEXIST problem. Please help! - VIZ3N - 03.06.2013

Quote:
Originally Posted by Pillhead2007
Посмотреть сообщение
Код:
new File:totalAccount=fopen("/BuGliCH/total/totalAccount.ini", io_write);
if(fexist(totalAccount)
{
fwrite(totalAccount, "total accounts = 0");
fclose(totalAccount);
}
try this
Quote:
Originally Posted by ZaakWest
Посмотреть сообщение
strcmp is for comparing strings, not integers.
Код:
new File:totalAccount=fopen("/BuGliCH/total/totalAccount.ini", io_write);
if(fexist(totalAccount)
{
fwrite(totalAccount, "total accounts = 0");
fclose(totalAccount);
}}
There.
Either of that replies. Ive followed this post: http://forum.sa-mp.com/showthread.ph...60#post2553860
and there was an S on if(fexist(totalAccount), like if(fexists(totalAccount). but I deleted it because it was giving me the undefined symbol result


Re: FEXIST problem. Please help! - 2KY - 03.06.2013

pawn Код:
new File:totalAccount=fopen("BuGliCH/total/totalAccount.ini", io_write);
if(!fexist("BuGliCH/total/totalAccount.ini")
{
fwrite(totalAccount, "total accounts = 0");
fclose(totalAccount);
}



Re: FEXIST problem. Please help! - Pottus - 03.06.2013

if(!fexist("BuGliCH/total/totalAccount.ini")) you were missing the ")" on the end is everyone blind ?