10.03.2016, 19:22
I was editing this gamemode and then all of a sudden these warnings popped up, I didn't touch anything within this area of code so I don't know what's happening... Please help...
Parts of each of the code
Warning line is
Next warning; will post the command it is in.
Warning line
Last warning line; part of the code
You can probably guess where the warning is... but the warning line is
Thanks in advance to whom ever helps me.
As always who ever helps will get +1 Rep.
Thanks Tass.
Code:
(1569) : warning 202: number of arguments does not match definition (4687) : warning 202: number of arguments does not match definition (24980) : warning 202: number of arguments does not match definition
PHP Code:
new File:file = fopen("DroppedGuns.ini", io_read);
if(file)
{
new buffer[256], FileCoords[7][20];
for(new g = 0; g < MAX_OBJ; g++)
{
fread(file, buffer);
split(buffer, FileCoords, ',');
dGunData[g][ObjPos][0] = floatstr(FileCoords[0]);
dGunData[g][ObjPos][1] = floatstr(FileCoords[1]);
dGunData[g][ObjPos][2] = floatstr(FileCoords[2]);
dGunData[g][ObjData][0] = strval(FileCoords[3]);
dGunData[g][ObjData][1] = strval(FileCoords[4]);
dGunData[g][ObjInt] = strval(FileCoords[5]);
dGunData[g][ObjWorld] = strval(FileCoords[6]);
if(dGunData[g][ObjData][0] > 0 && dGunData[g][ObjData][1] != 0 && dGunData[g][ObjPos][0] != 0)
{
dGunData[g][ObjID] = CreateDynamicObject(GunObjects[dGunData[g][ObjData][0]], dGunData[g][ObjPos][0], dGunData[g][ObjPos][1], dGunData[g][ObjPos][2]-1, 93.7, 120.0, 120.0, dGunData[g][ObjWorld], dGunData[g][ObjInt], -1, 200.0, 0.0);
printf("* %s loaded: %f,%f,%f,", GunNames[dGunData[g][ObjData][0]], dGunData[g][ObjPos][0], dGunData[g][ObjPos][1], dGunData[g][ObjPos][2]-1);
}
}
}
PHP Code:
dGunData[g][ObjID] = CreateDynamicObject(GunObjects[dGunData[g][ObjData][0]], dGunData[g][ObjPos][0], dGunData[g][ObjPos][1], dGunData[g][ObjPos][2]-1, 93.7, 120.0, 120.0, dGunData[g][ObjWorld], dGunData[g][ObjInt], -1, 200.0, 0.0);
PHP Code:
CMD:dropgun(playerid, params[])
{
new
world = GetPlayerVirtualWorld(playerid), interior = GetPlayerInterior(playerid);
if(GetPlayerState(playerid) != PLAYER_STATE_ONFOOT) return 1;
new GunID = GetPlayerWeapon(playerid);
new GunAmmo = GetPlayerAmmo(playerid);
if(GunID > 0 && GunAmmo != 0)
{
new f = MAX_OBJ+1;
for(new a = 0; a < MAX_OBJ; a++)
{
if(dGunData[a][ObjPos][0] == 0.0)
{
f = a;
break;
}
}
if(f > MAX_OBJ) return SendClientMessage(playerid, COLOR_LIGHTRED, "You can not drop your gun at the moment. (max limit exceeded)");
RemovePlayerWeapon(playerid, GunID);
dGunData[f][ObjData][0] = GunID;
dGunData[f][ObjData][1] = GunAmmo;
dGunData[f][ObjInt] = interior;
dGunData[f][ObjWorld] = world;
GetPlayerPos(playerid, dGunData[f][ObjPos][0], dGunData[f][ObjPos][1], dGunData[f][ObjPos][2]);
dGunData[f][ObjID] = CreateDynamicObject(GunObjects[GunID], dGunData[f][ObjPos][0], dGunData[f][ObjPos][1], dGunData[f][ObjPos][2]-1, 93.7, 120.0, 120.0, world, interior, -1, 200.0, 0.0);
new buffer[50];
format(buffer, sizeof(buffer), "You threw your %s on the ground.", GunNames[dGunData[f][ObjData][0]]);
SendClientMessage(playerid, -1, buffer);
// Logging bans
new dropgunstring[256];
new Hour, Minute, Second;
gettime(Hour, Minute, Second);
format(dropgunstring, sizeof(dropgunstring), "[%d:%d:%d] %s threw his %s on the ground.", Hour, Minute, Second, GetName(playerid), GunNames[dGunData[f][ObjData][0]]);
DropGunLog(dropgunstring);
// -------------------------------------------------------
}
return 1;
}
PHP Code:
dGunData[f][ObjID] = CreateDynamicObject(GunObjects[GunID], dGunData[f][ObjPos][0], dGunData[f][ObjPos][1], dGunData[f][ObjPos][2]-1, 93.7, 120.0, 120.0, world, interior, -1, 200.0, 0.0);
PHP Code:
stock CreateDroppedGun(GunID, GunAmmo, Float:gPosX, Float:gPosY, Float:gPosZ, world, interior)
{
new f = MAX_OBJ+1;
for(new a = 0; a < MAX_OBJ; a++)
{
if(dGunData[a][ObjPos][0] == 0.0)
{
f = a;
break;
}
}
if(f > MAX_OBJ) return;
dGunData[f][ObjData][0] = GunID;
dGunData[f][ObjData][1] = GunAmmo;
dGunData[f][ObjPos][0] = gPosX;
dGunData[f][ObjPos][1] = gPosY;
dGunData[f][ObjPos][2] = gPosZ;
dGunData[f][ObjInt] = interior;
dGunData[f][ObjWorld] = world;
dGunData[f][ObjID] = CreateDynamicObject(GunObjects[GunID], dGunData[f][ObjPos][0], dGunData[f][ObjPos][1], dGunData[f][ObjPos][2]-1, 93.7, 120.0, 120.0, dGunData[f][ObjWorld], dGunData[f][ObjInt], -1, 200.0, 0.0);
return;
}
PHP Code:
dGunData[f][ObjID] = CreateDynamicObject(GunObjects[GunID], dGunData[f][ObjPos][0], dGunData[f][ObjPos][1], dGunData[f][ObjPos][2]-1, 93.7, 120.0, 120.0, dGunData[f][ObjWorld], dGunData[f][ObjInt], -1, 200.0, 0.0);
As always who ever helps will get +1 Rep.
Thanks Tass.