03.01.2013, 11:51
Command:
Error:
Line 35935:
Whole the function:
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;
}
Код:
(35935) : error 001: expected token: ")", but found "{"
pawn Код:
{
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;
}