FEXIST problem. Please help!
#1

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
Reply
#2

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

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.
Reply
#4

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
Reply
#5

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

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


Forum Jump:


Users browsing this thread: 1 Guest(s)