I don't get this...
#1

Command:
pawn Код:
if(strcmp(cmd, "/news", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            new vehicleid = GetPlayerVehicleID(playerid);
            if(PlayerInfo[playerid][pMember] == 9 || PlayerInfo[playerid][pLeader] == 9)
            {
                if(!PlayerToPoint(6,playerid,-2086.2217,549.3022,245.8954) || !IsPlayerInVehicle(playerid, IsASanCar(vehicleid))
                {
                    SendClientMessage(playerid, COLOR_GREY, "[ERROR]: "COL_WHITE"Sorry, You cannot perform this command unless you are in a SAN Car or in it's studios.");
                    return 1;
                }
                    //GetPlayerName(playerid, sendername, sizeof(sendername));
                    new length = strlen(cmdtext);
                    while ((idx < length) && (cmdtext[idx] <= ' '))
                    {
                        idx++;
                    }
                    new offset = idx;
                    new result[128];
                    while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
                    {
                        result[idx - offset] = cmdtext[idx];
                        idx++;
                    }
                    result[idx - offset] = EOS;
                    if(!strlen(result))
                    {
                        SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /news [newstext]");
                        return 1;
                    }
                    format(string, sizeof(string), "[SAN News] %s: %s", sendername, result);
                    OOCNews(COLOR_NEWS,string);
            }
            else
            {
                SendClientMessage(playerid, COLOR_GREY, "[ERROR]: "COL_WHITE"You are not a News Reporter !");
            }
        }//not connected
        return 1;
    }
Error:
Код:
(35935) : error 001: expected token: ")", but found "{"
Line 35935:
pawn Код:
{
Whole the function:
pawn Код:
if(!PlayerToPoint(6,playerid,-2086.2217,549.3022,245.8954) || !IsPlayerInVehicle(playerid, IsASanCar(vehicleid))
                {
                    SendClientMessage(playerid, COLOR_GREY, "[ERROR]: "COL_WHITE"Sorry, You cannot perform this command unless you are in a SAN Car or in it's studios.");
                    return 1;
                }
Reply
#2

pawn Код:
if(!PlayerToPoint(6,playerid,-2086.2217,549.3022,245.8954) || !IsPlayerInVehicle(playerid, IsASanCar(vehicleid)))
                {
                    SendClientMessage(playerid, COLOR_GREY, "[ERROR]: "COL_WHITE"Sorry, You cannot perform this command unless you are in a SAN Car or in it's studios.");
                    return 1;
                }
Reply
#3

pawn Код:
if(!PlayerToPoint(6,playerid,-2086.2217,549.3022,245.8954) || !IsPlayerInVehicle(playerid, IsASanCar(vehicleid)))
Reply
#4

Thank you guys!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)