GATE CMD
#1

Hey all!!!!!!!!!!

I dont understand how to solve this problem . I made a gate cmd but get 2 errors

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/open", true)){
        if(IsPlayerInRangeOfPoint(playerid, 15.0, 996.29999, 1756, 12.1)){
            SetTimerEx("CloseGate", 7000, false, "i", playerid);
            MoveObject(Gate, 996.29999, 1756, 7, 3.0, 0.0, 0.0, 268.995);
            return SendClientMessage(playerid, 0x7A0000FF, "{FFFF00}[INFO] : {F5F5F5}The gate is open!");
        }
    }
    return 0;
}

forward CloseGate(playerid);
public CloseGate(playerid)
{
        MoveObject(Gate, 996.29999, 1756, 12.1, 3.0, 0.0, 0.0, 269);
        return SendClientMessage(playerid, "{FFFF00}[INFO] : {F5F5F5}The gate have succesfully been closed!");
        }
return 0;
}
And the error

pawn Код:
C:\Users\******\Desktop\*********\ 0.3X\gamemodes\gatehouse.pwn(107) : error 035: argument type mismatch (argument 2)
C:\Users\****\Desktop\***** FILE\0.3X\gamemodes\gatehouse.pwn(109) : error 010: invalid function or declaration
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


2 Errors.
Please can anyone solve this problem

I NEED IT URGENTLY +1 REP FOR HELPING ME !!
Reply
#2

Remove the { at the end of isplayerinrangeofpoint.
Reply
#3

STILL GET THE ERRORS
Reply
#4

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/open", true)){
        if(IsPlayerInRangeOfPoint(playerid, 15.0, 996.29999, 1756, 12.1))
            SetTimerEx("CloseGate", 7000, false, "i", playerid);
            MoveObject(Gate, 996.29999, 1756, 7, 3.0, 0.0, 0.0, 268.995);
            return SendClientMessage(playerid, 0x7A0000FF, "{FFFF00}[INFO] : {F5F5F5}The gate is open!");
        }
    }
    return 0;
}

forward CloseGate(playerid);
public CloseGate(playerid)
{
        MoveObject(Gate, 996.29999, 1756, 12.1, 3.0, 0.0, 0.0, 269);
        return SendClientMessage(playerid, "{FFFF00}[INFO] : {F5F5F5}The gate have succesfully been closed!");
        return 1;
}
Try this and tell if you have any errors.
Reply
#5

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/open", true)){
        if(IsPlayerInRangeOfPoint(playerid, 15.0, 996.29999, 1756, 12.1)){
            SetTimerEx("CloseGate", 7000, false, "i", playerid);
            MoveObject(Gate, 996.29999, 1756, 7, 3.0, 0.0, 0.0, 268.995);
            SendClientMessage(playerid, 0x7A0000FF, "{FFFF00}[INFO] : {F5F5F5}The gate is open!");
        }
    }
    return 0;
}

forward CloseGate(playerid);
public CloseGate(playerid)
{
        MoveObject(Gate, 996.29999, 1756, 12.1, 3.0, 0.0, 0.0, 269);
        SendClientMessage(playerid, "{FFFF00}[INFO] : {F5F5F5}The gate have succesfully been closed!");
return 1;
}
Try this
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)