SA-MP Forums Archive
Teleport error - 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 error (/showthread.php?tid=176165)



Teleport error - BaFTa - 12.09.2010

Hey guys! I need your help. I made some /drift cmds but they don`t work.. I used them before without even Warning and now it gives me error..

pawn Код:
if(strcmp(cmdtext,"/drift1",true) == 0)
    SendClientMessage(playerid, 0x21F600AA, "Drift 1");
    SetPlayerPos(playerid, -57.5438,-1414.3257,11.4271);
    }
    return 1;
 }
 
      if(strcmp(cmdtext,"/drift2",true) == 0)
    SendClientMessage(playerid, 0x21F600AA, "Drift 2");
    SetPlayerPos(playerid, 1257.6019,-2027.8704,59.1490);
      }
      return 1;
 }

Код:
D:\Games\San Andreas\Servers\BG Freeroam\gamemodes\Freeroam.pwn(632) : error 010: invalid function or declaration
D:\Games\San Andreas\Servers\BG Freeroam\gamemodes\Freeroam.pwn(636) : error 010: invalid function or declaration
D:\Games\San Andreas\Servers\BG Freeroam\gamemodes\Freeroam.pwn(639) : error 010: invalid function or declaration
D:\Games\San Andreas\Servers\BG Freeroam\gamemodes\Freeroam.pwn(643) : error 010: invalid function or declaration
D:\Games\San Andreas\Servers\BG Freeroam\gamemodes\Freeroam.pwn(645) : warning 203: symbol is never used: "ret_memcpy"
D:\Games\San Andreas\Servers\BG Freeroam\gamemodes\Freeroam.pwn(645) : warning 203: symbol is never used: "strtok"
Pawn compiler 3.2.3664              Copyright © 1997-2006, ITB CompuPhase


4 Errors.
(These are the lines 632 - 644)


Re: Teleport error - miokie - 12.09.2010

pawn Код:
if(strcmp(cmdtext,"/drift1",true) == 0)
{
    SendClientMessage(playerid, 0x21F600AA, "Drift 1");
    SetPlayerPos(playerid, -57.5438,-1414.3257,11.4271);
    return 1;
 }
 
      if(strcmp(cmdtext,"/drift2",true) == 0)
{
    SendClientMessage(playerid, 0x21F600AA, "Drift 2");
    SetPlayerPos(playerid, 1257.6019,-2027.8704,59.1490);
      return 1;
 }
You forgot the opening brackets and put a random bracket in...


Re: Teleport error - BaFTa - 12.09.2010

Still don`t work - the same errors..


Re: Teleport error - BaFTa - 12.09.2010

Nobody know?!


Re: Teleport error - CrucixTM - 12.09.2010

Try this:

pawn Код:
if(strcmp(cmdtext,"/drift1",true) == 0)
{
    SendClientMessage(playerid, 0x21F600AA, "Drift 1");
    SetPlayerPos(playerid, -57.5438,-1414.3257,11.4271);
    return 1;
}
 

if(strcmp(cmdtext,"/drift2",true) == 0)
{
    SendClientMessage(playerid, 0x21F600AA, "Drift 2");
    SetPlayerPos(playerid, 1257.6019,-2027.8704,59.1490);
    return 1;
}
Also, add this on top of your script to fix one of the warnings(right under your includes):

pawn Код:
#pragma unused ret_memcpy



Re: Teleport error - BaFTa - 28.09.2010

It still don`t work :@ ;(


Re: Teleport error - speedruntrainer - 28.09.2010

Do you have this in your script?:
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
If this doesn't work, what errors do you get?


Re: Teleport error - BaFTa - 16.10.2010

Ofcourse I have it - I have other CMDS too and they`re working..