Argument mismatch(Type1)
#1

Ok,i got this error:
pawn Код:
C:\Documents and Settings\Allu\Desktop\Failid\samp02Xserver.win32\gamemodes\lvdm.pwn(599) : error 035: argument type mismatch (argument 1)
And the code is:
Quote:

if(strcmp(cmdtext,"/varav", true) == 0)

Where is the problem?
Full code is:
pawn Код:
new cmdtext;
new AnthonyVarav;
new playerid;
new COLOR_LIGHTRED;

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

    {
    new gateuse;
    if(gateuse == 0)
      {
      MoveObject(AnthonyVarav, 322.057648, -1187.713867, 76.314163, 2.00);
      gateuse = 1;
    return 1;
    }
    else if(gateuse == 1)
    {
      MoveObject(AnthonyVarav, -322.057648, -1187.713867, 70.788826, 2.00);
      gateuse = 0;
      }
    else
        {
        SendClientMessage(playerid, COLOR_LIGHTRED, "Sa ei saa seda avada.");
        }
    }
}
Reply
#2

lol ...... such a silly mistake
change this
Код:
if(strcmp(cmdtext,"/varav", true) == 0)
To
Код:
if(strcmp(cmdtext,"/varav", true,6) == 0)
----- The syntax is if(strcmp(cmdtext,"/command", IgnoreCase(true to ignore) ,size of command including / ) == 0) --------- I guess this would be helpful for you ....
Reply
#3

it still gives me this error
Reply
#4

the given line
pawn Код:
if(strcmp(cmdtext,"/varav", true) == 0)
is completly ok, you are sure thats the line 599 ?
Reply
#5

Somebody see any logic in this script?
Reply
#6

Im a beginner,but can u give me a working script then?
Like this one,u can open a gate with a command?

And,
Quote:
Originally Posted by ♣ ⓐⓢⓢ
the given line
pawn Код:
if(strcmp(cmdtext,"/varav", true) == 0)
is completly ok, you are sure thats the line 599 ?
Yes,Im Sure.
Reply
#7

Код:
if(strcmp(cmdtext,"/varav", true) == 0)
{
new gateuse;
if(gateuse == 0)
  {
  MoveObject(AnthonyVarav, 322.057648, -1187.713867, 76.314163, 2.00);
 	  gateuse = 1;
    return 1;
    }
else if(gateuse == 1)
    {
 	  MoveObject(AnthonyVarav, -322.057648, -1187.713867, 70.788826, 2.00);
 	  gateuse = 0;
 	  }
else
{
SendClientMessage(playerid, COLOR_LIGHTRED, "Sa ei saa seda avada.");
}
return 1;
	}
You could try that, your original script compiles fine for me though.
Reply
#8

I dont know then,if u can compile and I can't,where is the problem then?
I still got an error in this line:
pawn Код:
if(strcmp(cmdtext,"/varav", true) == 0)
Reply
#9

new cmdtext;
should be
new cmdtext[256];

I know it is incorrect AT ALL, but anyway it is fix.
Reply
#10

I know its wrong,but thank you.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)