SA-MP Forums Archive
Error 029: Invalid expression, assumed zero. - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Error 029: Invalid expression, assumed zero. (/showthread.php?tid=270260)



Error 029: Invalid expression, assumed zero. - CaptainOwen - 19.07.2011

Код:
CMD:createposter(playerid, params[])
I'm getting the following errors:

Код:
C:\Documents and Settings\Michael\Desktop\Poster.pwn(47) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Michael\Desktop\Poster.pwn(47) : error 017: undefined symbol "cmd_createposter"
C:\Documents and Settings\Michael\Desktop\Poster.pwn(47) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Michael\Desktop\Poster.pwn(47) : fatal error 107: too many error messages on one line

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


4 Errors.



Re: Error 029: Invalid expression, assumed zero. - Amit_B - 19.07.2011

pawn Код:
CMD:createposter(playerid, params[])
{
}
..?


Re: Error 029: Invalid expression, assumed zero. - CaptainOwen - 19.07.2011

pawn Код:
CMD:createposter(playerid, params[])
{
    new
        MyPosterType[16],
        MyPosterText[128],
        szMessage[128],
        string[128],
        Float:x,
        Float:y,
        Float:z,

    if(sscanf(params, S[16]s[128], MyPosterType, MyPosterText));
    {
        SendErrorMessage(playerid, "SYNTAX: /createposter [poster type] [poster message]);
        return 1;
    }
    if(PlayerInfo [playerid] [myPoster] != 0)
    {
        SendClientMessage(playerid, COLOR_RED, "
ERROR: You have already placed a poster!");
    }
    if(!strcmp(MyPosterType, "
WANTED", true))
    {
        format(string, 128, "
[WANTED\n %s", MyPosterText);
        return 1;
    }
    if(!strcmp(MyPosterType, "
SELLING", true))
    {
        format(string, 128, "
[SELLING!]\n %s", MyPosterText);
        return 1;
    }
    if(!strcmp(MyPosterType, "
LOOKING", true))
    {
        format(string, 128, "
[LOOKING]\n %s", MyPosterText);
        return 1;
    }
   
    GetPlayerPos(playerid, x, y, z);
    PlayerInfo[playerid][myPoster] = Create3DTextLabel(string, 0xbec3232, x, y+1, z+2, 5.0, 0);
   
    format(szMessage, sizeof(szMessage), "
POSTED: You have successfully created a %s", PosterType);
    SendClientMessage(playerid, COLOR_GREEN, szMessage);
    return 1;
}
This is the whole code, though its just the first line provided thats giving me errors.


Re: Error 029: Invalid expression, assumed zero. - Amit_B - 19.07.2011

pawn Код:
SendErrorMessage(playerid, "SYNTAX: /createposter [poster type] [poster message]);
You've forgot another "


Re: Error 029: Invalid expression, assumed zero. - Runedog48 - 19.07.2011

Good eye


Re: Error 029: Invalid expression, assumed zero. - CaptainOwen - 19.07.2011

Yeah, though- it still hasn't fixed those four errors. Thanks though!


Re: Error 029: Invalid expression, assumed zero. - dowster - 19.07.2011

you do have #include <zcmd> near the top of your script right?


Re: Error 029: Invalid expression, assumed zero. - CaptainOwen - 19.07.2011

Obviously.


Re: Error 029: Invalid expression, assumed zero. - =WoR=Varth - 20.07.2011

Do you have missing bracket or something above that code?