This wont compile
#1

Код:
C:\Users\Austin\Desktop\pawno\gamemodes\testserver.pwn(54 -- 56) : error 029: invalid expression, assumed zero
C:\Users\Austin\Desktop\pawno\gamemodes\testserver.pwn(66) : error 010: invalid function or declaration
C:\Users\Austin\Desktop\pawno\gamemodes\testserver.pwn(69) : error 021: symbol already defined: "GetPlayerPos"
C:\Users\Austin\Desktop\pawno\gamemodes\testserver.pwn(71) : error 010: invalid function or declaration
C:\Users\Austin\Desktop\pawno\gamemodes\testserver.pwn(73) : error 010: invalid function or declaration
C:\Users\Austin\Desktop\pawno\gamemodes\testserver.pwn(75) : error 021: symbol already defined: "X"
C:\Users\Austin\Desktop\pawno\gamemodes\testserver.pwn(75) : error 021: symbol already defined: "Z"
C:\Users\Austin\Desktop\pawno\gamemodes\testserver.pwn(78) : error 010: invalid function or declaration
C:\Users\Austin\Desktop\pawno\gamemodes\testserver.pwn(80) : error 010: invalid function or declaration
C:\Users\Austin\Desktop\pawno\gamemodes\testserver.pwn(82) : error 021: symbol already defined: "X"
C:\Users\Austin\Desktop\pawno\gamemodes\testserver.pwn(82) : error 021: symbol already defined: "Z"
C:\Users\Austin\Desktop\pawno\gamemodes\testserver.pwn(85) : error 010: invalid function or declaration
C:\Users\Austin\Desktop\pawno\gamemodes\testserver.pwn(87) : error 010: invalid function or declaration
C:\Users\Austin\Desktop\pawno\gamemodes\testserver.pwn(89) : error 021: symbol already defined: "X"
C:\Users\Austin\Desktop\pawno\gamemodes\testserver.pwn(89) : error 021: symbol already defined: "Z"
C:\Users\Austin\Desktop\pawno\gamemodes\testserver.pwn(92) : error 010: invalid function or declaration
C:\Users\Austin\Desktop\pawno\gamemodes\testserver.pwn(94) : error 010: invalid function or declaration
C:\Users\Austin\Desktop\pawno\gamemodes\testserver.pwn(98) : error 010: invalid function or declaration
C:\Users\Austin\Desktop\pawno\gamemodes\testserver.pwn(100) : error 010: invalid function or declaration
C:\Users\Austin\Desktop\pawno\gamemodes\testserver.pwn(103) : error 010: invalid function or declaration
C:\Users\Austin\Desktop\pawno\gamemodes\testserver.pwn(105) : error 010: invalid function or declaration
C:\Users\Austin\Desktop\pawno\gamemodes\testserver.pwn(110) : error 010: invalid function or declaration
C:\Users\Austin\Desktop\pawno\gamemodes\testserver.pwn(112) : error 010: invalid function or declaration
C:\Users\Austin\Desktop\pawno\gamemodes\testserver.pwn(117) : error 010: invalid function or declaration
C:\Users\Austin\Desktop\pawno\gamemodes\testserver.pwn(119) : error 010: invalid function or declaration
C:\Users\Austin\Desktop\pawno\gamemodes\testserver.pwn(124) : error 010: invalid function or declaration

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


26 Errors.
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
(

    if(!strcmp(cmdtext, "/help"))
    {
        SendClientMessage(playerid, COLOR_YELLOW, "-------------------------------------------------------------------");
        SendClientMessage(playerid, COLOR_LIGHTERBLUE, "---NEW ERA HELP---");
        SendClientMessage(playerid, COLOR_LIGHTERBLUE, "/help");
        SendClientMessage(playerid, COLOR_LIGHTERBLUE, "/god");
        SendClientMessage(playerid, COLOR_LIGHTERBLUE, "/heal");
        SendClientMessage(playerid, COLOR_LIGHTERBLUE, "/repair");
        SendClientMessage(playerid, COLOR_YELLOW, "-------------------------------------------------------------------");
    }
    if(!strcmp(cmdtext, "/sultan"))
    {
        new Float:X, Float:Y, Float:Z;
        GetPlayerPos(playerid, X, Y, Z);
        CreateVehicle(560, X + 2, Y, Z, 0.0, 0, 0, 10); // 522 is the vehicle ID, change it to the Elegy
        return 1;
    }
    if(!strcmp(cmdtext, "/nrg"))
    {
        new Float:X, Float:Y, Float:Z;
        GetPlayerPos(playerid, X, Y, Z);
        CreateVehicle(522, X + 2, Y, Z, 0.0, 0, 0, 10); // 522 is the vehicle ID, change it to the Elegy
        return 1;
    }
        if(!strcmp(cmdtext, "/cheetah"))
    {
        new Float:X, Float:Y, Float:Z;
        GetPlayerPos(playerid, X, Y, Z);
        CreateVehicle(415, X + 2, Y, Z, 0.0, 0, 0, 10); // 522 is the vehicle ID, change it to the Elegy
        return 1;
    }
        if(!strcmp(cmdtext, "/elegy"))
    {
        new Float:X, Float:Y, Float:Z;
        GetPlayerPos(playerid, X, Y, Z);
        CreateVehicle(562, X + 2, Y, Z, 0.0, 0, 0, 10); // 522 is the vehicle ID, change it to the Elegy
        return 1;
    }
    if(!strcmp(cmdtext, "/dm"))
    {
        SetPlayerPos(playerid,1397.3000488,-26.0000000,1007.9000244);
        SetPlayerInterior(playerid, 1);
        return 1;
    }
        if(!strcmp(cmdtext, "/kill"))
    {
        SetPlayerHealth (playerid, 0.0);
        return 1;
    }
    if(!strcmp(cmdtext, "/god"))
    {
        SetPlayerArmour(playerid, 1000000000.0);
        SetPlayerHealth(playerid, 1000000000.0);
        SendClientMessage(playerid, 0xFFFFFFAA, "God Mode.");
        return 1;
    }
        if(!strcmp(cmdtext, "/heal"))
    {
        SetPlayerArmour(playerid, 100.0);
        SetPlayerHealth(playerid, 100.0);
        SendClientMessage(playerid, 0xFFFFFFAA, "You have been healed.");
        return 1;
    }
    if (strcmp("/goto island", cmdtext, true, 10) == 0)
    {
        SetPlayerPos(playerid, 1046.9867, -2667.2463, 15.0484);
        SendClientMessage(playerid, COLOR_RED, "Sent to SARP Island");
        SetPlayerInterior(playerid, 0);
        return 1;
    }
Reply
#2

do you have top of the script this?
pawn Код:
#include <a_samp>
Reply
#3

and btw:

sorry for double posting but!
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/help"))
    {
        SendClientMessage(playerid, COLOR_YELLOW, "-------------------------------------------------------------------");
        SendClientMessage(playerid, COLOR_LIGHTERBLUE, "---NEW ERA HELP---");
        SendClientMessage(playerid, COLOR_LIGHTERBLUE, "/help");
        SendClientMessage(playerid, COLOR_LIGHTERBLUE, "/god");
        SendClientMessage(playerid, COLOR_LIGHTERBLUE, "/heal");
        SendClientMessage(playerid, COLOR_LIGHTERBLUE, "/repair");
        SendClientMessage(playerid, COLOR_YELLOW, "-------------------------------------------------------------------");
    }
    if(!strcmp(cmdtext, "/sultan"))
    {
        new Float:X, Float:Y, Float:Z;
        GetPlayerPos(playerid, X, Y, Z);
        CreateVehicle(560, X + 2, Y, Z, 0.0, 0, 0, 10); // 522 is the vehicle ID, change it to the Elegy
        return 1;
    }
    if(!strcmp(cmdtext, "/nrg"))
    {
        new Float:X, Float:Y, Float:Z;
        GetPlayerPos(playerid, X, Y, Z);
        CreateVehicle(522, X + 2, Y, Z, 0.0, 0, 0, 10); // 522 is the vehicle ID, change it to the Elegy
        return 1;
    }
        if(!strcmp(cmdtext, "/cheetah"))
    {
        new Float:X, Float:Y, Float:Z;
        GetPlayerPos(playerid, X, Y, Z);
        CreateVehicle(415, X + 2, Y, Z, 0.0, 0, 0, 10); // 522 is the vehicle ID, change it to the Elegy
        return 1;
    }
        if(!strcmp(cmdtext, "/elegy"))
    {
        new Float:X, Float:Y, Float:Z;
        GetPlayerPos(playerid, X, Y, Z);
        CreateVehicle(562, X + 2, Y, Z, 0.0, 0, 0, 10); // 522 is the vehicle ID, change it to the Elegy
        return 1;
    }
    if(!strcmp(cmdtext, "/dm"))
    {
        SetPlayerPos(playerid,1397.3000488,-26.0000000,1007.9000244);
        SetPlayerInterior(playerid, 1);
        return 1;
    }
        if(!strcmp(cmdtext, "/kill"))
    {
        SetPlayerHealth (playerid, 0.0);
        return 1;
    }
    if(!strcmp(cmdtext, "/god"))
    {
        SetPlayerArmour(playerid, 1000000000.0);
        SetPlayerHealth(playerid, 1000000000.0);
        SendClientMessage(playerid, 0xFFFFFFAA, "God Mode.");
        return 1;
    }
        if(!strcmp(cmdtext, "/heal"))
    {
        SetPlayerArmour(playerid, 100.0);
        SetPlayerHealth(playerid, 100.0);
        SendClientMessage(playerid, 0xFFFFFFAA, "You have been healed.");
        return 1;
    }
    if (strcmp("/goto island", cmdtext, true, 10) == 0)
    {
        SetPlayerPos(playerid, 1046.9867, -2667.2463, 15.0484);
        SendClientMessage(playerid, COLOR_RED, "Sent to SARP Island");
        SetPlayerInterior(playerid, 0);
        return 1;
    }
return 0; // if you dont have anithing here
}
Reply
#4

Yes i have #include <a_samp> and that didnt work
Reply
#5

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/help"))
    {
        SendClientMessage(playerid, COLOR_YELLOW, "-------------------------------------------------------------------");
        SendClientMessage(playerid, COLOR_LIGHTERBLUE, "---NEW ERA HELP---");
        SendClientMessage(playerid, COLOR_LIGHTERBLUE, "/help");
        SendClientMessage(playerid, COLOR_LIGHTERBLUE, "/god");
        SendClientMessage(playerid, COLOR_LIGHTERBLUE, "/heal");
        SendClientMessage(playerid, COLOR_LIGHTERBLUE, "/repair");
        SendClientMessage(playerid, COLOR_YELLOW, "-------------------------------------------------------------------");
        return 1;
    }
    if(!strcmp(cmdtext, "/sultan"))
    {
        new Float:X, Float:Y, Float:Z;
        GetPlayerPos(playerid, X, Y, Z);
        CreateVehicle(560, X + 2, Y, Z, 0.0, 0, 0, 10); // 522 is the vehicle ID, change it to the Elegy
        return 1;
    }
    if(!strcmp(cmdtext, "/nrg"))
    {
        new Float:X, Float:Y, Float:Z;
        GetPlayerPos(playerid, X, Y, Z);
        CreateVehicle(522, X + 2, Y, Z, 0.0, 0, 0, 10); // 522 is the vehicle ID, change it to the Elegy
        return 1;
    }
    if(!strcmp(cmdtext, "/cheetah"))
    {
        new Float:X, Float:Y, Float:Z;
        GetPlayerPos(playerid, X, Y, Z);
        CreateVehicle(415, X + 2, Y, Z, 0.0, 0, 0, 10); // 522 is the vehicle ID, change it to the Elegy
        return 1;
    }
    if(!strcmp(cmdtext, "/elegy"))
    {
        new Float:X, Float:Y, Float:Z;
        GetPlayerPos(playerid, X, Y, Z);
        CreateVehicle(562, X + 2, Y, Z, 0.0, 0, 0, 10); // 522 is the vehicle ID, change it to the Elegy
        return 1;
    }
    if(!strcmp(cmdtext, "/dm"))
    {
        SetPlayerPos(playerid,1397.3000488,-26.0000000,1007.9000244);
        SetPlayerInterior(playerid, 1);
        return 1;
    }
    if(!strcmp(cmdtext, "/kill"))
    {
        SetPlayerHealth (playerid, 0.0);
        return 1;
    }
    if(!strcmp(cmdtext, "/god"))
    {
        SetPlayerArmour(playerid, 1000000000.0);
        SetPlayerHealth(playerid, 1000000000.0);
        SendClientMessage(playerid, 0xFFFFFFAA, "God Mode.");
        return 1;
    }
    if(!strcmp(cmdtext, "/heal"))
    {
        SetPlayerArmour(playerid, 100.0);
        SetPlayerHealth(playerid, 100.0);
        SendClientMessage(playerid, 0xFFFFFFAA, "You have been healed.");
        return 1;
    }
    if (strcmp("/goto island", cmdtext, true, 10) == 0)
    {
        SetPlayerPos(playerid, 1046.9867, -2667.2463, 15.0484);
        SendClientMessage(playerid, COLOR_RED, "Sent to SARP Island");
        SetPlayerInterior(playerid, 0);
        return 1;
    }
return 0; // if you dont have anithing here
}
Reply
#6

How did you do that
Reply
#7

Quote:
Originally Posted by ajmac22
Посмотреть сообщение
How did you do that
Do what? it worked?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)