SA-MP Forums Archive
help with errors - 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: help with errors (/showthread.php?tid=139787)



help with errors - johnathon956 - 06.04.2010

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp(cmdtext,"/skydive",true)==0)
    SetPlayerPos(playerid,-2342.1726,-1176.2717,2145.3945);
    GivePlayerWeapon(playerid, 46, 1);
  return 1;
    }
    if(strcmp(cmd, "/cmds", true) == 0) {
    SendPlayerFormattedText(playerid,"to spawn a car do /carmenu",0);
    SendPlayerFormattedText(playerid,".",0);
    SendPlayerFormattedText(playerid,".",0);
    SendPlayerFormattedText(playerid,".", 0);
    SendPlayerFormattedText(playerid,".", 0);
  return 1;
}
Код:
C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\Untitled.pwn(290) : error 010: invalid function or declaration
C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\Untitled.pwn(292) : error 010: invalid function or declaration
C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\Untitled.pwn(293) : error 010: invalid function or declaration
C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\Untitled.pwn(294) : error 010: invalid function or declaration
C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\Untitled.pwn(295) : error 010: invalid function or declaration
C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\Untitled.pwn(296) : error 010: invalid function or declaration
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


6 Errors.



Re: help with errors - andmeida10 - 06.04.2010

i think u wanna that:

pawn Код:
if(strcmp(cmdtext, "/cmds", true) == 0)
{
SendClientMessage(playerid, COLOR,"to spawn a car do /carmenu");
SendClientMessage(playerid, COLOR,".");
SendClientMessage(playerid, COLOR,".");
SendClientMessage(playerid, COLOR,".");
SendClientMessage(playerid,COLOR,".");
}



Re: help with errors - johnathon956 - 06.04.2010

Quote:
Originally Posted by andmeida10
i think u wanna that:

pawn Код:
if(strcmp(cmdtext, "/cmds", true) == 0)
{
SendClientMessage(playerid, COLOR,"to spawn a car do /carmenu");
SendClientMessage(playerid, COLOR,".");
SendClientMessage(playerid, COLOR,".");
SendClientMessage(playerid, COLOR,".");
SendClientMessage(playerid,COLOR,".");
}
Код:
C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\Untitled.pwn(290) : error 010: invalid function or declaration
C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\Untitled.pwn(298) : error 010: invalid function or declaration
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.



Re: help with errors - wafffllesss - 06.04.2010

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext,"/skydive",true)==0)
{ // here...
SetPlayerPos(playerid,-2342.1726,-1176.2717,2145.3945);
GivePlayerWeapon(playerid, 46, 1);
  return 1;
}
if(strcmp(cmd, "/cmds", true) == 0) {
SendPlayerFormattedText(playerid,"to spawn a car do /carmenu",0);
SendPlayerFormattedText(playerid,".",0);
SendPlayerFormattedText(playerid,".",0);
SendPlayerFormattedText(playerid,".", 0);
SendPlayerFormattedText(playerid,".", 0);
  return 1;
}



Re: help with errors - johnathon956 - 06.04.2010

Quote:
Originally Posted by wafffllesss
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext,"/skydive",true)==0)
{ // here...
SetPlayerPos(playerid,-2342.1726,-1176.2717,2145.3945);
GivePlayerWeapon(playerid, 46, 1);
  return 1;
}
if(strcmp(cmd, "/cmds", true) == 0) {
SendPlayerFormattedText(playerid,"to spawn a car do /carmenu",0);
SendPlayerFormattedText(playerid,".",0);
SendPlayerFormattedText(playerid,".",0);
SendPlayerFormattedText(playerid,".", 0);
SendPlayerFormattedText(playerid,".", 0);
  return 1;
}
lots of errors


Re: help with errors - dice7 - 06.04.2010

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp(cmdtext,"/skydive",true)==0)
    {
        SetPlayerPos(playerid,-2342.1726,-1176.2717,2145.3945);
        GivePlayerWeapon(playerid, 46, 1);
        return 1;
    }
   
    if(strcmp(cmd, "/cmds", true) == 0)
    {
        SendPlayerFormattedText(playerid,"to spawn a car do /carmenu",0);
        SendPlayerFormattedText(playerid,".",0);
        SendPlayerFormattedText(playerid,".",0);
        SendPlayerFormattedText(playerid,".", 0);
        SendPlayerFormattedText(playerid,".", 0);
        return 1;
    }
    return 0;
}



Re: help with errors - Mikep. - 06.04.2010

public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext,"/skydive",true))
{
SetPlayerPos(playerid,-2342.1726,-1176.2717,2145.3945);
GivePlayerWeapon(playerid, 46, 1);
return 1;
}
if(!strcmp(cmdtext, "/cmds", true))
{
SendPlayerFormattedText(playerid,"to spawn a car do /carmenu",0);
SendPlayerFormattedText(playerid,".",0);
SendPlayerFormattedText(playerid,".",0);
SendPlayerFormattedText(playerid,".", 0);
SendPlayerFormattedText(playerid,".", 0);
return 1;
}
return 0;
}