{ Problem
#1

D:\DOC ILYASS\SAMP Server\gamemodes\LSGW.pwn(203) : error 001: expected token: ")", but found "{"
D:\DOC ILYASS\SAMP Server\gamemodes\LSGW.pwn(20 : error 001: expected token: ")", but found "{"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


2 Errors.


Код:
if (strcmp("/weapons", cmdtext, true, 10 == 3)
	{
	    ShowPlayerDialog(playerid, Weapons, DIALOG_STYLE_LIST, "Weapons", "Deagle   Price :2000$ \n Sawn-Off   Price :1200$ \n Uzi   Price :720$ \n M4   :2000$", "Buy", "Cancel");
	    return 1;
	}
	if (strcmp("/admincommands", cmdtext, true, 10 == 4)
	{
Reply
#2

You have a problem with your if statement syntax, I recommend reading through the Pawn documentation for more information on its syntax, here is the fixed version:

pawn Код:
if (strcmp("/weapons", cmdtext, true, 10) == 3)
{
    ShowPlayerDialog(playerid, Weapons, DIALOG_STYLE_LIST, "Weapons", "Deagle   Price :2000$ \n Sawn-Off   Price :1200$ \n Uzi   Price :720$ \n M4   :2000$", "Buy", "Cancel");
    return 1;
}

if (strcmp("/admincommands", cmdtext, true, 10) == 4)
{
Additionally I'm not sure what you're trying to achieve with the == 3/4, I assume you're confused there too, also with the setting of the command length to 10 each time, which is not needed at all. So here is what I think you're looking for really:

pawn Код:
if (strcmp("/weapons", cmdtext, true) == 0)
{
    ShowPlayerDialog(playerid, Weapons, DIALOG_STYLE_LIST, "Weapons", "Deagle   Price :2000$ \n Sawn-Off   Price :1200$ \n Uzi   Price :720$ \n M4   :2000$", "Buy", "Cancel");
    return 1;
}

if (strcmp("/admincommands", cmdtext, true) == 0)
{
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)