SA-MP Forums Archive
[HELP]Basic - 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: [HELP]Basic (/showthread.php?tid=452177)



[HELP]Basic - shittt - 20.07.2013

hi guys, I'm with these problems in my script, can someone help me solve them?

ERRORS:

pawn Код:
error 012: invalid function call, not a valid address
 warning 215: expression has no effect
 error 001: expected token: ";", but found ")"
 error 029: invalid expression, assumed zero
fatal error 107: too many error messages on one line
Line:

pawn Код:
new file[256]; file = GetPlayerFile(playerid);  //ERROR HERE , ERROR HERE....
    if(dini_Exists(file))
    {
        Player[playerid][Registrado] = true;
    }
    else
    {
        Player[playerid][Registrado] = false;
    }



Re: [HELP]Basic - iggy1 - 20.07.2013

Its because you seperated the variable definitions with a semi-colon not a comma.

pawn Код:
new file[256] = GetPlayerFile(playerid);//will only work if GetPlayerFile returns a string (of size <=256)
EDIT: I was wrong about the var definitions, see my code comment.