SA-MP Forums Archive
A small problem with my script - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: A small problem with my script (/showthread.php?tid=129465)



A small problem with my script - Majataka - 22.02.2010

when i
Код:
if(!strcmp(cmdtext,"/cartp",true)) {
  SetPlayerPos(playerid, 2278,89, 1457,782, 15);
  return 1;
}
i get
Код:
warning 202: number of arguments does not match definition
when i use
Код:
if(!strcmp(cmdtext,"/cartp",true)) {
  SetPlayerPos(playerid, 2278,89, 1457);
  return 1;
}
and go ingame and do /cartp it takes me somewhere high...
I tried /save and i tried X-Treme SAMP ulimate... to get the cords and nothing D: Whats wrong


Re: A small problem with my script - Torran - 22.02.2010

pawn Код:
if(!strcmp(cmdtext,"/cartp",true)) {
  SetPlayerPos(playerid, 2278.89, 1457.782, 15);
  return 1;
}



Re: A small problem with my script - GhoulSlayeR - 22.02.2010

Well, I'm going to point out this mistake so you don't do it in the future.

You've got a , where a "." needed to be.


Re: A small problem with my script - Majataka - 22.02.2010

jesus chirst D: Same prob....
now i did
Код:
if(!strcmp(cmdtext,"/cartp",true))
  {
    SetPlayerPos(playerid, 2278.89, 1457.782, 15);
    return 1;
  }
and got
Код:
error 010: invalid function or declaration
x4


Re: A small problem with my script - Torran - 22.02.2010

try

pawn Код:
if(strcmp(cmdtext,"/cartp", true) == 0)
{
SetPlayerPos(playerid, 2278.89, 1457.782, 15);
return 1;
}



Re: A small problem with my script - Razvann - 22.02.2010

Quote:
Originally Posted by Majataka
jesus chirst D: Same prob....
now i did
Код:
if(!strcmp(cmdtext,"/cartp",true))
  {
    SetPlayerPos(playerid, 2278.89, 1457.782, 15);
    return 1;
  }
and got
Код:
error 010: invalid function or declaration
x4
pawn Код:
if(strcmp(cmd, "/cartp", true) == 0)
  {
    SetPlayerPos(playerid, 2278.89, 1457.782, 15);
    return 1;
  }



Re: A small problem with my script - aircombat - 22.02.2010

Quote:
Originally Posted by Majataka
jesus chirst D: Same prob....
now i did
Код:
if(!strcmp(cmdtext,"/cartp",true))
  {
    SetPlayerPos(playerid, 2278.89, 1457.782, 15);
    return 1;
  }
and got
Код:
error 010: invalid function or declaration
x4
dude , i put that in my script and get no errors and it compile good and work ??!?!?
________
Universal Health Warehouse


Re: A small problem with my script - Torran - 22.02.2010

Quote:
Originally Posted by Razvann
Quote:
Originally Posted by Majataka
jesus chirst D: Same prob....
now i did
Код:
if(!strcmp(cmdtext,"/cartp",true))
  {
    SetPlayerPos(playerid, 2278.89, 1457.782, 15);
    return 1;
  }
and got
Код:
error 010: invalid function or declaration
x4
pawn Код:
if(strcmp(cmd, "/cartp", true) == 0)
  {
    SetPlayerPos(playerid, 2278.89, 1457.782, 15);
    return 1;
  }
That will still give him errors...


Re: A small problem with my script - Majataka - 22.02.2010

Quote:
Originally Posted by [AC
Etch ]
Quote:
Originally Posted by Majataka
jesus chirst D: Same prob....
now i did
Код:
if(!strcmp(cmdtext,"/cartp",true))
  {
    SetPlayerPos(playerid, 2278.89, 1457.782, 15);
    return 1;
  }
and got
Код:
error 010: invalid function or declaration
x4
Yeh D: did something wrong but works fine now P: Thanks

dude , i put that in my script and get no errors and it compile good and work ??!?!?



Re: A small problem with my script - Torran - 22.02.2010

pawn Код:
if(strcmp(cmdtext,"/cartp",true) == 0)
{
SetPlayerPos(playerid, 2278.89, 1457.782, 15);
return 1;
}
Have you tried that?