29.01.2010, 08:37
D:\samp02Xserver.win32\gamemodes\GF.pwn(46685) : error 035: argument type mismatch (argument 2)
D:\samp02Xserver.win32\gamemodes\GF.pwn(46710) : error 025: function heading differs from prototype
D:\samp02Xserver.win32\gamemodes\GF.pwn(46710) : error 021: symbol already defined: "IsPlayerInZone"
public update_zarea() {
new line1[10];
new line2[10];
for(new i=0; i<MAX_PLAYERS; i++) {
if(IsPlayerConnected(i) && zareaupdates[i] == 1) {
if(IsPlayerInzarea(i,player_zarea[i])) { }
else {
new player_zarea_before;
player_zarea_before = player_zarea[i];
player_zarea[i] = -1;
for(new j=0; j<sizeof(zarea);j++) {
if(IsPlayerInzarea(i,j) && player_zarea[i] == -1) {
if(player_zarea_before == -1) GameTextForPlayer(i,zarea[j][zarea_name],1500,1);
else if(strcmp(zarea[j][zarea_name],zarea[player_zarea_before][zarea_name],true) != 0) GameTextForPlayer(i,zarea[j][zarea_name],1500,1);
player_zarea[i] = j;
format(line1,10,"p%dzarea",i);
format(line2,10,"%d",j);
PropertySet(line1,line2);
}
}
if(player_zarea[i] == -1) player_zarea[i] = player_zarea_before;
}
}
}
}
IsPlayerInzarea(playerid, zareaid) {
if(zareaid == -1) return 0;
new Float, Float:y, Float:z;
GetPlayerPos(playerid,x,y,z);
if(x >= zarea[zareaid][zarea_minx] && x < zarea[zareaid][zarea_maxx]
&& y >= zarea[zareaid][zarea_miny] && y < zarea[zareaid][zarea_maxy]
&& z >= zarea[zareaid][zarea_minz] && z < zarea[zareaid][zarea_maxz]
&& z < 900.0) return 1;
return 0;
}
public update_zones() {
new line1[10];
new line2[10];
for(new i=0; i<MAX_PLAYERS; i++) {
if(IsPlayerConnected(i) && zoneupdates[i] == 1) {
if(IsPlayerInZone(i,player_zone[i])) { }
else {
new player_zone_before;
player_zone_before = player_zone[i];
player_zone[i] = -1;
for(new j=0; j<sizeof(zones);j++) {
if(IsPlayerInZone(i,j) && player_zone[i] == -1) { <------------------------ Line 46685
if(player_zone_before == -1) GameTextForPlayer(i,zones[j][zone_name],1500,1);
else if(strcmp(zones[j][zone_name],zones[player_zone_before][zone_name],true) != 0) GameTextForPlayer(i,zones[j][zone_name],1500,1);
player_zone[i] = j;
format(line1,10,"p%dzone",i);
format(line2,10,"%d",j);
PropertySet(line1,line2);
}
}
if(player_zone[i] == -1) player_zone[i] = player_zone_before;
}
}
}
}
IsPlayerInZone(playerid, zoneid) { <--------- 46710
if(zoneid == -1) return 0;
new Float, Float:y, Float:z;
GetPlayerPos(playerid,x,y,z);
if(x >= zones[zoneid][zone_minx] && x < zones[zoneid][zone_maxx]
&& y >= zones[zoneid][zone_miny] && y < zones[zoneid][zone_maxy]
&& z >= zones[zoneid][zone_minz] && z < zones[zoneid][zone_maxz]
&& z < 900.0) return 1;
return 0;
}
D:\samp02Xserver.win32\gamemodes\GF.pwn(46710) : error 025: function heading differs from prototype
D:\samp02Xserver.win32\gamemodes\GF.pwn(46710) : error 021: symbol already defined: "IsPlayerInZone"
public update_zarea() {
new line1[10];
new line2[10];
for(new i=0; i<MAX_PLAYERS; i++) {
if(IsPlayerConnected(i) && zareaupdates[i] == 1) {
if(IsPlayerInzarea(i,player_zarea[i])) { }
else {
new player_zarea_before;
player_zarea_before = player_zarea[i];
player_zarea[i] = -1;
for(new j=0; j<sizeof(zarea);j++) {
if(IsPlayerInzarea(i,j) && player_zarea[i] == -1) {
if(player_zarea_before == -1) GameTextForPlayer(i,zarea[j][zarea_name],1500,1);
else if(strcmp(zarea[j][zarea_name],zarea[player_zarea_before][zarea_name],true) != 0) GameTextForPlayer(i,zarea[j][zarea_name],1500,1);
player_zarea[i] = j;
format(line1,10,"p%dzarea",i);
format(line2,10,"%d",j);
PropertySet(line1,line2);
}
}
if(player_zarea[i] == -1) player_zarea[i] = player_zarea_before;
}
}
}
}
IsPlayerInzarea(playerid, zareaid) {
if(zareaid == -1) return 0;
new Float, Float:y, Float:z;
GetPlayerPos(playerid,x,y,z);
if(x >= zarea[zareaid][zarea_minx] && x < zarea[zareaid][zarea_maxx]
&& y >= zarea[zareaid][zarea_miny] && y < zarea[zareaid][zarea_maxy]
&& z >= zarea[zareaid][zarea_minz] && z < zarea[zareaid][zarea_maxz]
&& z < 900.0) return 1;
return 0;
}
public update_zones() {
new line1[10];
new line2[10];
for(new i=0; i<MAX_PLAYERS; i++) {
if(IsPlayerConnected(i) && zoneupdates[i] == 1) {
if(IsPlayerInZone(i,player_zone[i])) { }
else {
new player_zone_before;
player_zone_before = player_zone[i];
player_zone[i] = -1;
for(new j=0; j<sizeof(zones);j++) {
if(IsPlayerInZone(i,j) && player_zone[i] == -1) { <------------------------ Line 46685
if(player_zone_before == -1) GameTextForPlayer(i,zones[j][zone_name],1500,1);
else if(strcmp(zones[j][zone_name],zones[player_zone_before][zone_name],true) != 0) GameTextForPlayer(i,zones[j][zone_name],1500,1);
player_zone[i] = j;
format(line1,10,"p%dzone",i);
format(line2,10,"%d",j);
PropertySet(line1,line2);
}
}
if(player_zone[i] == -1) player_zone[i] = player_zone_before;
}
}
}
}
IsPlayerInZone(playerid, zoneid) { <--------- 46710
if(zoneid == -1) return 0;
new Float, Float:y, Float:z;
GetPlayerPos(playerid,x,y,z);
if(x >= zones[zoneid][zone_minx] && x < zones[zoneid][zone_maxx]
&& y >= zones[zoneid][zone_miny] && y < zones[zoneid][zone_maxy]
&& z >= zones[zoneid][zone_minz] && z < zones[zoneid][zone_maxz]
&& z < 900.0) return 1;
return 0;
}