SA-MP Forums Archive
Some Errors - 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)
+--- Thread: Some Errors (/showthread.php?tid=342792)



Some Errors - omershlush - 15.05.2012

Quote:

C:\Users\Administrator\Desktop\Samp Server\Cars.pwn(82) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Users\Administrator\Desktop\Samp Server\Cars.pwn(82) : warning 215: expression has no effect
C:\Users\Administrator\Desktop\Samp Server\Cars.pwn(82) : error 001: expected token: ";", but found ")"
C:\Users\Administrator\Desktop\Samp Server\Cars.pwn(82) : error 029: invalid expression, assumed zero
C:\Users\Administrator\Desktop\Samp Server\Cars.pwn(82) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


4 Errors.

when running this:
Quote:

public OnPlayerConnect(playerid)
{
if(!fexist(PlayerFile(playerid)))
{
new File:file = fopen(PlayerFile(playerid));
fwrite(file, "OwnVehicle=0");
fwrite(file, "VehicleID=0");
fclose(file);
}
return 1;
}

thanks for helpers


Re: Some Errors - kazekene - 15.05.2012

Try this

Код:
public OnPlayerConnect(playerid)
{
if(!fexist(PlayerFile(playerid))
{
new File:file = fopen(PlayerFile(playerid));
fwrite(file, "OwnVehicle=0");
fwrite(file, "VehicleID=0");
fclose(file);
}
return 1;
}



Re: Some Errors - J@bb@Wockeez - 15.05.2012

No make that:

pawn Код:
public OnPlayerConnect(playerid)
{
    if(!fexist(PlayerFile(playerid)))
        {
        new File:file = fopen(PlayerFile(playerid));
        fwrite(file, "OwnVehicle=0");
        fwrite(file, "VehicleID=0");
        fclose(file)
    }
    return 1;
}