Teleport error
#1

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)
Reply
#2

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...
Reply
#3

Still don`t work - the same errors..
Reply
#4

Nobody know?!
Reply
#5

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
Reply
#6

It still don`t work :@ ;(
Reply
#7

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

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


Forum Jump:


Users browsing this thread: 1 Guest(s)