Error on 1 Line
#1

Hello,

im getting many errors on this Line :-
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/colors", true))
    {
        ShowPlayerDialog(playerid, colors, DIALOG_STYLE_LIST, "Colors List", "Red\nBlue\nGreen\nYellow\nPink\nPurple\nGrey\nWhite\nOrange\nLime\nNext Page", "Select", "Cancel");
        return 1;
    }
    return 0;
}
Errors :-
Код:
C:\Documents and Settings\User\Desktop\Server\filterscripts\tColor.pwn(25) : error 029: invalid expression, assumed zero
C:\Documents and Settings\User\Desktop\Server\filterscripts\tColor.pwn(25) : warning 215: expression has no effect
C:\Documents and Settings\User\Desktop\Server\filterscripts\tColor.pwn(25) : warning 215: expression has no effect
C:\Documents and Settings\User\Desktop\Server\filterscripts\tColor.pwn(25) : warning 215: expression has no effect
C:\Documents and Settings\User\Desktop\Server\filterscripts\tColor.pwn(25) : warning 215: expression has no effect
C:\Documents and Settings\User\Desktop\Server\filterscripts\tColor.pwn(25) : warning 215: expression has no effect
C:\Documents and Settings\User\Desktop\Server\filterscripts\tColor.pwn(25) : error 001: expected token: ";", but found ")"
C:\Documents and Settings\User\Desktop\Server\filterscripts\tColor.pwn(25) : error 029: invalid expression, assumed zero
C:\Documents and Settings\User\Desktop\Server\filterscripts\tColor.pwn(25) : fatal error 107: too many error messages on one line

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


4 Errors.
Help.
Reply
#2

Any Help?
Reply
#3

for commands why don't you use zcmd, its faster and easyer to use then onplayercommandtext
Reply
#4

just help me to remove errors.
Reply
#5

How do you define colors?
Reply
#6

Include aColors
Reply
#7

No, he means the dialogid called "colors". That's most probably the reason you get errors.
Reply
#8

oh, see here :-
Код:
#include <a_samp>
#include <aColors>

#define colors
#define colors1
#define colors2
#define colors3
Reply
#9

Don't use simple names for defines like that. Do you know what a define does? Use unique names that you know won't get mixed up such as DIALOG_COLORS. You also need to put a number after your define if you want to use this for a dialog.

pawn Код:
#define DIALOG_COLORS 1
I also recommend using ZCMD or YCMD.
Reply
#10

Quote:
Originally Posted by SuperViper
Посмотреть сообщение
Don't use simple names for defines like that. Do you know what a define does? Use unique names that you know won't get mixed up such as DIALOG_COLORS. You also need to put a number after your define if you want to use this for a dialog.

pawn Код:
#define DIALOG_COLORS 1
I also recommend using ZCMD or YCMD.
Also make sure that the number is less than or equal to 32767
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)