SA-MP Forums Archive
TeLePoRt PrObLeM - 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: TeLePoRt PrObLeM (/showthread.php?tid=89066)



TeLePoRt PrObLeM - MB@ - 30.07.2009

Help When I Type This I Get The Eror

C:\Documents and Settings\Administrator\Desktop\Stunt-server\gamemodes\Stunt_World.pwn(123) : error 010: invalid function or declaration

__________________________________________________ ____________________________________________

public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/help", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid, 0xFFFF00AA, "Type /teles for list of teleports");
SendClientMessage(playerid, 0xFFFF00AA, "Type /cmds for list of commands");

}
return 0;
}
if(strcmp("/teles", cmdtext, true, 10) == 0)
SendClientMessage(playerid, 0xFFFF00AA,"Stunts: /nrg,/nrg2,/nrg3,/nrg4,/nrg5,/nrg6,/nrg7");
SendClientMessage(playerid, 0xFFFF00AA,"/kart,/quad,/monster,/faggio.");
SendClientMessage(playerid, 0xFFFF00AA,"Jumps: /bounce,/bounce2,/hj,/sj,/cj,/wj,/bj");
SentClientMessage(playerid, 0xFFFF00AA,"War zones: /war,/ww,/hw.");


Re: TeLePoRt PrObLeM - Joe Staff - 30.07.2009

put your /teles command above the "return 0;" also use brackets ('{' and '}') to close it off


Re: TeLePoRt PrObLeM - Khelif - 30.07.2009

like this
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
  if(strcmp("/help", cmdtext, true, 10) == 0)
  {
    SendClientMessage(playerid, 0xFFFF00AA, "Type /teles for list of teleports");
    SendClientMessage(playerid, 0xFFFF00AA, "Type /cmds for list of commands");
    return 1;
  }
  if(strcmp("/teles", cmdtext, true, 10) == 0)
  {
    SendClientMessage(playerid, 0xFFFF00AA,"Stunts: /nrg,/nrg2,/nrg3,/nrg4,/nrg5,/nrg6,/nrg7");
    SendClientMessage(playerid, 0xFFFF00AA,"/kart,/quad,/monster,/faggio.");
    SendClientMessage(playerid, 0xFFFF00AA,"Jumps: /bounce,/bounce2,/hj,/sj,/cj,/wj,/bj");
    SentClientMessage(playerid, 0xFFFF00AA,"War zones: /war,/ww,/hw.");
    return 1;
  }
  return 0;
}



Re: TeLePoRt PrObLeM - MB@ - 30.07.2009

Thx guyz!!!