//============Includes================//
#include <a_samp>
#include <mapandreas>
forward OnBombExplode(playerid, num, Float:x, Float:y, Float:z);
enum bombEnum {
bombName[32],
expID,
Float:expRadius,
Float:accuracy,
bombModel,
bombModelRot,
expDelay,
reloadTime,
dropAtOnce,
dropAtOnceDelay
}
new gBombTypes[][bombEnum] = {
{"Nothing", 0, 0.0, 0.0, 0, 0, 0, 0, 0, 0},
{"Normal bombs", 11, 2.8, 6.0, 1636, 270, 500, 150, 1, 0},
{"Fire bombs", 1, 4.0, 8.0, 1636, 270, 0, 200, 1, 0},
{"Big bombs", 7, 4.5, 10.0, 3790, 270, 0, 750, 1, 0},
{"Laser-guided Bombs", 6, 5.0, 25.0, 1636, 270, 0, 1500, 1, 0},
{"Heavy bombs", -1, 5.0, 15.0, 345, 270, 0, 10000, 1, 0},
{"Anti-Missile Flares", -2, 150.0, 35.0, 354, 0, 5000, 10000, 1, 0},
{"Nuclear Bombs", -3, 4.0, 10.0, 3790, 270, 0, 10000, 1, 0},
{"Clusterbombs", 11, 2.5, 3.0, 1636, 270, 0, 15000, 12, 0},
{"Carpetbombs", 11, 2.5, 5.5, 1636, 270, 0, 15000, 12, 100}
};
public OnBombExplode(playerid, num, Float:x, Float:y, Float:z)
{
for(new i = 0; i < MAX_PLAYERS; i ++)
{
if(GetPlayerDistanceToPoint(i, x, y, z) < 2)
//========================Linha abaixo que dб o Warning=========================
if(gBombTypes[btype[playerid][num]][2]) //FSbomber.pwn(369) : warning 213: tag mismatch
{
SetPVarInt(i, "nearExp", playerid);
SetTimerEx("ResetNearExp", 15000, 0, "i", i);
}
}
return 1;
}
public OnBombExplode(playerid, num, Float:x, Float:y, Float:z)
{
for(new i = 0; i < MAX_PLAYERS; i ++)
{
if(GetPlayerDistanceToPoint(i, x, y, z) < 2 gBombTypes[btype[playerid][num]][2])
{
SetPVarInt(i, "nearExp", playerid);
SetTimerEx("ResetNearExp", 15000, 0, "i", i);
}
}
return 1;
}
FSbomber.pwn(369) : error 001: expected token: ")", but found "-identifier-"
FSbomber.pwn(369) : warning 213: tag mismatch
FSbomber.pwn(369) : warning 215: expression has no effect
FSbomber.pwn(369) : error 001: expected token: ";", but found ")"
FSbomber.pwn(369) : error 029: invalid expression, assumed zero
FSbomber.pwn(369) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
4 Errors.
public OnBombExplode(playerid, num, Float:x, Float:y, Float:z)
{
for(new i = 0; i < MAX_PLAYERS; i ++)
{
if(GetPlayerDistanceToPoint(i, x, y, z) < 2)
if(gBombTypes[btype[playerid][num]][expID]) /* o 2 mudei pra isto! a bombenum "expID" */
{
SetPVarInt(i, "nearExp", playerid);
SetTimerEx("ResetNearExp", 15000, 0, "i", i);
}
}
return 1;
}
public OnBombExplode(playerid, num, Float:x, Float:y, Float:z)
{
for(new i = 0; i < MAX_PLAYERS; i ++)
{
if(GetPlayerDistanceToPoint(i, x, y, z) < 2)
{
SetPVarInt(i, "nearExp", playerid);
SetTimerEx("ResetNearExp", 15000, 0, "i", i);
}
}
return 1;
}
public OnBombExplode(playerid, num, Float:x, Float:y, Float:z) {
for(new i; i != MAX_PLAYERS; i++) {
if(GetPlayerDistanceToPoint(i, x, y, z) < 2) {
if(gBombTypes[btype[playerid][num]][2]) {
SetPVarInt(i, "nearExp", playerid);
SetTimerEx("ResetNearExp", 15000, false, "i", i);
}
}
}
return 1;
}
Tente pawn Code: public OnBombExplode(playerid, num, Float: x, Float: y, Float: z) { for(new i = 0; i < MAX_PLAYERS; i ++) { if(GetPlayerDistanceToPoint(i, x, y, z) < 2) { SetPVarInt(i, "nearExp", playerid); SetTimerEx("ResetNearExp", 15000, 0, "i", i); } } return 1; } |
public OnBombExplode(playerid, num, Float: x, Float: y, Float: z) { for(new i; i != MAX_PLAYERS; i++) { if(GetPlayerDistanceToPoint(i, x, y, z) < 2) { if(gBombTypes[btype[playerid][num]][2]) { SetPVarInt(i, "nearExp", playerid); SetTimerEx("ResetNearExp", 15000, false, "i", i); } } } return 1; } |