Error 029: Invalid expression, assumed zero.
#1

Код:
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.
Reply
#2

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

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

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

Good eye
Reply
#6

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

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

Obviously.
Reply
#9

Do you have missing bracket or something above that code?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)