How to fix this, what is wrong?
#1

pawn Код:
#include <a_samp>

#pragma tabsize 0
#include sscanf2
#include zcmd

#define COLOR_BLUE 0x0259EAFF

forward TeleportPlayers(playerid, Float:X, Float:Y, Float:Z);
public TeleportPlayers(playerid, Float:X, Float:Y, Float:Z)
{
    for(new i = 0; i < MAX_PLAYERS; i++) SetPlayerPos(i, 31.8683,2241.9827,126.6797);
    return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{


     if (strcmp("/alexobando21", cmdtext, true, 10) == 0)
{
        new szString[128], Float:Position[3], szName[MAX_PLAYER_NAME];
        GetPlayerName(playerid, szName, sizeof(szName));
        GetPlayerPos(playerid, Position[0], Position[1], Position[2]);
        format(szString, sizeof(szString), "~g~Admin ~w~%s started a war get ready!", szName);
        GameTextForAll(szString, 5000, 5 );
        SetPlayerVirtualWorld(playerid, 9);

        SetTimerEx("TeleportPlayers", 10000, false, "d", playerid, Position[0], Position[1], Position[2]);
        return 1;

}
CMD:ekk(playerid, params[])
{
new str[128], ID;

if(sscanf, "us[128]", ID, str) return SendClientMessage(playerid, -1, "Usage: ekk [playerid] [reason]");
if(GetPlayerVirtualWorld(playerid) == 9)
    {
          SetPlayerPos(ID, x,y,z);
          SetPlayerVirtualWorld(ID, 0);
    }
else
    {
          SendClientMessage(ID, -1, "The player you specified is not in Virtual World 9!");
    }
return 1;
}
return 0;



}
pawn Код:
C:\Users\Alex\Desktop\Otros\CodSamp\codsamp_aw\filterscripts\AntiHH.pwn(34) : error 029: invalid expression, assumed zero
C:\Users\Alex\Desktop\Otros\CodSamp\codsamp_aw\filterscripts\AntiHH.pwn(34) : error 017: undefined symbol "cmd_ekk"
C:\Users\Alex\Desktop\Otros\CodSamp\codsamp_aw\filterscripts\AntiHH.pwn(34) : error 029: invalid expression, assumed zero
C:\Users\Alex\Desktop\Otros\CodSamp\codsamp_aw\filterscripts\AntiHH.pwn(34) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.
Reply
#2

zcmd commands must be used outside of any callback.
Reply
#3

Ok

pawn Код:
C:\Users\Alex\Desktop\Otros\CodSamp\codsamp_aw\filterscripts\AntiHH.pwn(43) : error 076: syntax error in the expression, or invalid function call
C:\Users\Alex\Desktop\Otros\CodSamp\codsamp_aw\filterscripts\AntiHH.pwn(46) : error 017: undefined symbol "x"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


2 Errors.
pawn Код:
#include <a_samp>

#pragma tabsize 0
#include sscanf2
#include zcmd

#define COLOR_BLUE 0x0259EAFF

forward TeleportPlayers(playerid, Float:X, Float:Y, Float:Z);
public TeleportPlayers(playerid, Float:X, Float:Y, Float:Z)
{
    for(new i = 0; i < MAX_PLAYERS; i++) SetPlayerPos(i, 31.8683,2241.9827,126.6797);
    return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{


     if (strcmp("/alexobando21", cmdtext, true, 10) == 0)
{
        new szString[128], Float:Position[3], szName[MAX_PLAYER_NAME];
        GetPlayerName(playerid, szName, sizeof(szName));
        GetPlayerPos(playerid, Position[0], Position[1], Position[2]);
        format(szString, sizeof(szString), "~g~Admin ~w~%s started a war get ready!", szName);
        GameTextForAll(szString, 5000, 5 );
        SetPlayerVirtualWorld(playerid, 9);

        SetTimerEx("TeleportPlayers", 10000, false, "d", playerid, Position[0], Position[1], Position[2]);
        return 1;

}
return 0;



}
CMD:ekk(playerid, params[])
{
new str[128], ID;

if(sscanf, "us[128]", ID, str) return SendClientMessage(playerid, -1, "Usage: ekk [playerid] [reason]");
if(GetPlayerVirtualWorld(playerid) == 9)
    {
          SetPlayerPos(ID, x,y,z);
          SetPlayerVirtualWorld(ID, 0);
    }
else
    {
          SendClientMessage(ID, -1, "The player you specified is not in Virtual World 9!");
    }
return 1;
}
Reply
#4

1. Your #include is incorrect; #include zcmd ---> #include <zcmd>
2. You mix zcmd with OnPlayerCommandText ...
Reply
#5

pawn Код:
#include <a_samp>

#pragma tabsize 0
#include sscanf2
#include <zcmd>

#define COLOR_BLUE 0x0259EAFF

forward TeleportPlayers(playerid, Float:X, Float:Y, Float:Z);
public TeleportPlayers(playerid, Float:X, Float:Y, Float:Z)
{
    for(new i = 0; i < MAX_PLAYERS; i++) SetPlayerPos(i, 31.8683,2241.9827,126.6797);
    return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{


     if (strcmp("/alexobando21", cmdtext, true, 10) == 0)
{
        new szString[128], Float:Position[3], szName[MAX_PLAYER_NAME];
        GetPlayerName(playerid, szName, sizeof(szName));
        GetPlayerPos(playerid, Position[0], Position[1], Position[2]);
        format(szString, sizeof(szString), "~g~Admin ~w~%s started a war get ready!", szName);
        GameTextForAll(szString, 5000, 5 );
        SetPlayerVirtualWorld(playerid, 9);

        SetTimerEx("TeleportPlayers", 10000, false, "d", playerid, Position[0], Position[1], Position[2]);
        return 1;

}
return 0;



}
CMD:ekk(playerid, params[])
{
new str[128], ID;

if(sscanf, "us[128]", ID, str) return SendClientMessage(playerid, -1, "Usage: ekk [playerid] [reason]");
if(GetPlayerVirtualWorld(playerid) == 9)
    {
          SetPlayerPos(ID, x,y,z);
          SetPlayerVirtualWorld(ID, 0);
    }
else
    {
          SendClientMessage(ID, -1, "The player you specified is not in Virtual World 9!");
    }
return 1;
}
pawn Код:
C:\Users\Alex\Desktop\Otros\CodSamp\codsamp_aw\filterscripts\AntiHH.pwn(43) : error 076: syntax error in the expression, or invalid function call
C:\Users\Alex\Desktop\Otros\CodSamp\codsamp_aw\filterscripts\AntiHH.pwn(46) : error 017: undefined symbol "x"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


2 Errors.
Fine Keep having same mistake
Reply
#6

#include <sscanf2> , define "x".
Reply
#7

pawn Код:
C:\Users\Alex\Desktop\Otros\CodSamp\codsamp_aw\filterscripts\AntiHH.pwn(6) : error 038: extra characters on line
C:\Users\Alex\Desktop\Otros\CodSamp\codsamp_aw\filterscripts\AntiHH.pwn(44) : error 076: syntax error in the expression, or invalid function call
C:\Users\Alex\Desktop\Otros\CodSamp\codsamp_aw\filterscripts\AntiHH.pwn(47) : error 017: undefined symbol "x"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


3 Errors.
pawn Код:
#include <a_samp>

#pragma tabsize 0
#include <sscanf2> , define "x".
#include <zcmd>


#define COLOR_BLUE 0x0259EAFF

forward TeleportPlayers(playerid, Float:X, Float:Y, Float:Z);
public TeleportPlayers(playerid, Float:X, Float:Y, Float:Z)
{
    for(new i = 0; i < MAX_PLAYERS; i++) SetPlayerPos(i, 31.8683,2241.9827,126.6797);
    return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{


     if (strcmp("/alexobando21", cmdtext, true, 10) == 0)
{
        new szString[128], Float:Position[3], szName[MAX_PLAYER_NAME];
        GetPlayerName(playerid, szName, sizeof(szName));
        GetPlayerPos(playerid, Position[0], Position[1], Position[2]);
        format(szString, sizeof(szString), "~g~Admin ~w~%s started a war get ready!", szName);
        GameTextForAll(szString, 5000, 5 );
        SetPlayerVirtualWorld(playerid, 9);

        SetTimerEx("TeleportPlayers", 10000, false, "d", playerid, Position[0], Position[1], Position[2]);
        return 1;

}
return 0;



}
CMD:ekk(playerid, params[])
{
new str[128], ID;

if(sscanf, "us[128]", ID, str) return SendClientMessage(playerid, -1, "Usage: ekk [playerid] [reason]");
if(GetPlayerVirtualWorld(playerid) == 9)
    {
          SetPlayerPos(ID, x,y,z);
          SetPlayerVirtualWorld(ID, 0);
    }
else
    {
          SendClientMessage(ID, -1, "The player you specified is not in Virtual World 9!");
    }
return 1;
}
Reply
#8

Do you know scripting at all, pal ?
define x, means that you need to define it....
Reply
#9

I dont know about zcmd, dcmd, sscanf, I just know strmp...

Please help...
Reply
#10

FFS ! xD It's zcmd OR strcmp !! And not together so you shoose zcmd OR strcmp:

pawn Код:
CMD:alexobando21(playerid,params[])
{
        new szString[128], Float:Position[3], szName[MAX_PLAYER_NAME];
        GetPlayerName(playerid, szName, sizeof(szName));
        GetPlayerPos(playerid, Position[0], Position[1], Position[2]);
        format(szString, sizeof(szString), "~g~Admin ~w~%s started a war get ready!", szName);
        GameTextForAll(szString, 5000, 5 );
        SetPlayerVirtualWorld(playerid, 9);

        SetTimerEx("TeleportPlayers", 10000, false, "d", playerid, Position[0], Position[1], Position[2]);
        return 1;
}

CMD:ekk(playerid, params[])
{
new str[128], ID;

if(sscanf, "us[128]", ID, str) return SendClientMessage(playerid, -1, "Usage: ekk [playerid] [reason]");
if(GetPlayerVirtualWorld(playerid) == 9)
    {
          SetPlayerPos(ID, x,y,z);
          SetPlayerVirtualWorld(ID, 0);
    }
else
    {
          SendClientMessage(ID, -1, "The player you specified is not in Virtual World 9!");
    }
return 1;
}
And to make it easy: delete
pawn Код:
public OnPlayerCommandText(playerid,cmdtext[]) { }
Reply
#11

Huh? I thought ZCMD disables ALL strcmp commands?
Reply
#12

Quote:
Originally Posted by samtey
Посмотреть сообщение
Huh? I thought ZCMD disables ALL strcmp commands?
Well ... that's what i said ZCMD-format or strcmp-format and not the both in one script
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)