Help Me Please !!!
#1

please check this code for me, and tell if have something wrong.

this is code about zone, I am create it with my own. i want to check when have someone walk to this zone,and when me complie
D:\BTM\gamemodes\repair.pwn(292) : error 025: function heading differs from prototype
it have this error, please explain it for me.
sorry for my bad english.

thx you!!

forward IsPlayerInZone(playerid,Float:zone_minx,Float:zone _miny,Float:zone_maxx,Float:zone_maxy);
public IsPlayerInZone(playerid,Float:zone_minx,Float:zone _miny,Float:zone_maxx,Float:zone_maxy)
{
if(IsPlayerConnected(playerid))
{
new Floatlyx,Floatlyy,Floatlyz;
GetPlayerPos(playerid,plyx,plyy,plyz);
if((plyx > zone_minx) || (plyx < zone_maxx) || (plyy > zone_maxy) || (plyy < zone_miny))
{
return 1;
}
}
return 0;
}

and this is command for create zone

if(strcmp(cmd,"/createzone",true)== 0)
{
if(IsPlayerConnected(playerid))
{
new gangzone;
tmp = strtok(cmdtext,idx);
new amount = strval(tmp);
if(amount > 0)
{
if(pGangZoneCreate[playerid] == 0)
{
new Float,Float:y,Float:z;
GetPlayerPos(playerid,x,y,z);
new Float:zone_minx,Float:zone_miny,Float:zone_maxx,Fl oat:zone_maxy;
zone_minx = x;
zone_miny = y+amount;
zone_maxx = x+amount;
zone_maxy = y;
gangzone = GangZoneCreate(zone_minx,zone_miny,zone_maxx,zone_ maxy);
GangZoneShowForPlayer(playerid,gangzone,COLOR_RED) ;
pGangZoneCreate[playerid] = 1;
}
else
{
SendClientMessage(playerid,COLOR_RED,"you is already Createzone");
SendClientMessage(playerid,COLOR_RED,"so, your old zone will has destroy now. ");
pGangZoneCreate[playerid] = 0;
GangZoneDestroy(gangzone);
return 1;
}
}
else
{
SendClientMessage(playerid,COLOR_RED,"/createzone [area of zone]");
return 1;
}
}
return 1;
}
return 0;
}

Reply
#2

can you please mark the line of the error
Reply
#3

I don't think he posted the error. That error is when you forward something different then the public function says. If that makes any sense. Look here.

pawn Код:
forward DoSomething(playerid);//Header

public DoSomething()//Prototype
{
   return 1;
}
That would generate this error because the function header differs from the prototype. I really don't know what a prototype is but I think it's that.
Reply
#4

yeah thats weird because they look the same to me
Reply
#5

That's why I don't think you posted the error line. Hit Ctrl+G in pawno and type in 292 when the dialog box comes up. Then post the line it takes you to.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)