invalid expression, assumed zero.
#1

Basically, I'm scripting a GM and I got this error.
Код:
(10691) : error 029: invalid expression, assumed zero
pawn Код:
SendClientMessage(playerid, WHITE, "You can't talk ICly whilst you're spectating.");
                        }
      }

                    else //10691
                    {
                        SendClientMessage(playerid, WHITE, "You may not speak ICly whilst you're in OOC prison.");
                    }
                }
            }
        }
    return 0;
}
Can anyone fix it?
Reply
#2

Where's the preceding if statement for that else statement? Are you sure your brackets are correct?
Reply
#3

pawn Код:
if(strlen(text) >= 128)
                {
                    SendClientMessage(playerid, WHITE, "Your message must be shorter than 128 characters.");
                }
                else
                {
                    if(Player[playerid][PrisonID] != 1)
                    {
                        if(Spectator[playerid][SpecSpectatingPlayer] == -1)

                            {
                                format(string, sizeof(string), "[%s Accent] %s says: %s", Player[playerid][Accent], GetName(playerid), text);
                                NearByMessage(playerid, RED, string);
                                ICChatLog(string);
                            }
                            else
                            {
                                format(string, sizeof(string), "[%s Accent] %s says: %s", Player[playerid][Accent], GetName(playerid), text);
                                NearByMessage(playerid, WHITE, string);
                                ICChatLog(string);
                            }
                        }
                        else
                        {
                            SendClientMessage(playerid, WHITE, "You can't talk ICly whilst you're spectating.");
                        }
      }

                    else
                    {
                        SendClientMessage(playerid, WHITE, "You may not speak ICly whilst you're in OOC prison.");
                    }
                }
            }
        }
    return 0;
}
Reply
#4

EDIT: Double Post, Delete.
Reply
#5

Bump.
Reply
#6

What I see here is that there are more 'else' than 'if' statements.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)