03.04.2014, 01:30
I almost lose my mind because of this problem.
I got errors while compile
ERRORS:
I got errors while compile
pawn Код:
CMD:pedit(playerid,params[])
{
new string[128],
option,
time,
point,
Float:x,
Float:y,
Float:z,
name,
profit;
if(PlayerInfo[playerid][pAdmin] < 6) return SendClientMessage(playerid, COLOR_GREY, "ERROR: You are not authorized to use this command.");
if(!aDuty[playerid]) return SendClientMessage(playerid, COLOR_GREY, "You are not on Admin Duty.");
if(sscanf(params, "ii", point, option))
{
SendClientMessage(playerid, 0xFF0000AA, "[Usage]:{FFFFFF} /pedit [pointid] [option]");
SendClientMessage(playerid, COLOR_GREY, "Options Avaliable: Position - Time - name - profit");
}
if(strcmp(option,"position",true) == 0)//19012
{
if(point < 1 || point > 5) return SendClientMessage(playerid, COLOR_GREY, "Points are between 1 and 5.");
GetPlayerPos(playerid,x,y,z);
DestroyDynamic3DTextLabel(PointInfo[point][pText]);
DestroyPickup(PointInfo[point][pPickup]);
PointInfo[point][pX] = x;
PointInfo[point][pY] = y;
PointInfo[point][pZ] = z;
PointInfo[point][pText] = CreateDynamic3DTextLabel("Point\n/capture", -1, PointInfo[point][pX], PointInfo[point][pY], PointInfo[point][pZ]+0.3, 15);
PointInfo[point][pPickup] = CreatePickup(1212, 1, PointInfo[point][pX], PointInfo[point][pY], PointInfo[point][pZ], 0);
format(string, sizeof(string)," You have set the point %s id cordinates in your position",PointInfo[point][pName]);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "AdmWarn: %s has changed the %s point position.", RPN(playerid), PointInfo[point][pName]);
SendAdminMessage(COLOR_DARKRED, 1, string);
}
if(!strcmp(option, "time", true, 5))//19028
{
if(sscanf(params, "iii", point,option,time)) return SendClientMessage(playerid, 0xFF0000AA, "[Usage]:{FFFFFF} /pedit [pointid] time [timeid]");
if(point < 1 || point > 5) return SendClientMessage(playerid, COLOR_GREY, "Points are between 1 and 5.");
if(time < 0) return SendClientMessage(playerid, COLOR_GREY, "Invalid time.");
point = point-1;
PointInfo[point][pTime] = time;
format(string, sizeof(string), "AdmWarn: %s has set the %s point to be capturable in %d hours.", RPN(playerid), PointInfo[point][pName], PointInfo[point][pTime]);
SendAdminMessage(COLOR_DARKRED, 1, string);
}
if(!strcmp(option, "name", true, 5))//19038
{
if(sscanf(params, "iii", point,option,name)) return SendClientMessage(playerid, 0xFF0000AA, "[Usage]:{FFFFFF} /pedit [pointid] name [name]");
if(point < 1 || point > 5) return SendClientMessage(playerid, COLOR_GREY, "Points are between 1 and 5.");
format(string, sizeof(string), "AdmWarn: %s has changed %s point name to %s", RPN(playerid), PointInfo[point][pName], name);
SendAdminMessage(COLOR_DARKRED, 1, string);
PointInfo[point][pName] = name;
}
if(!strcmp(option, "profit", true, 5))//19046
{
if(sscanf(params, "iii", point,option,profit)) return SendClientMessage(playerid, 0xFF0000AA, "[Usage]:{FFFFFF} /pedit [pointid] profit [amount]");
if(point < 1 || point > 5) return SendClientMessage(playerid, COLOR_GREY, "Points are between 1 and 5.");
format(string, sizeof(string), "AdmWarn: %s has changed %s point profit to %d$", RPN(playerid), PointInfo[point][pName], profit);
SendAdminMessage(COLOR_DARKRED, 1, string);
PointInfo[point][pProfit] = profit;
}
return 1;
}
Код:
C:\Users\Ahmed Hassan\Desktop\New folder\E-RP\gamemodes\E-RP.pwn(19012) : error 035: argument type mismatch (argument 1) C:\Users\Ahmed Hassan\Desktop\New folder\E-RP\gamemodes\E-RP.pwn(19028) : error 035: argument type mismatch (argument 1) C:\Users\Ahmed Hassan\Desktop\New folder\E-RP\gamemodes\E-RP.pwn(19038) : error 035: argument type mismatch (argument 1) C:\Users\Ahmed Hassan\Desktop\New folder\E-RP\gamemodes\E-RP.pwn(19046) : error 035: argument type mismatch (argument 1)