error 035: argument type mismatch (argument 1) -
Robert_Crawford - 01.03.2012
Код:
C:\Users\HCC\Desktop\fire.pwn(185) : error 035: argument type mismatch (argument 1)
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Error.
Lines 58 - 63
pawn Код:
new Float:randomSpawns[][][3] =
{
{ {1535.6497,-1679.7516,13.3828}, {1535.6281,-1684.0664,13.5469}, {1535.6559,-1689.5146,13.5469}, {1535.5216,-1696.2633,13.5469} }, // fire 1
{ {1698.7971,1435.2810,10.7149}, {1702.1265,1432.8711,10.6901}, {1703.1891,1426.2205,10.6406}, {1703.6338,1420.9512,10.6484} }, // fire 2
{ {1172.3600,-1323.3131,15.4029}, {1175.4486,-1325.5078,14.3906}, {1178.7393,-1326.0090,14.1349}, {1182.5364,-1327.6281,13.5824} } //fire 3
};
181 - 188
pawn Код:
public RandomFireTimer()
{
new rndfire = random(sizeof(randomSpawns));
{
AddFire(randomSpawns[rndfire][0], randomSpawns[rndfire][1], randomSpawns[rndfire][2]);
}
return 1;
}
Re: error 035: argument type mismatch (argument 1) -
Walsh - 01.03.2012
pawn Код:
public RandomFireTimer()
{
new rndfire = random(sizeof(randomSpawns));
{
AddFire(randomSpawns[rndfire][0], randomSpawns[rndfire][1], randomSpawns[rndfire][2]);
}
return 1;
}
You don't add brackets after the variable since there was no statement.
Try this.
pawn Код:
public RandomFireTimer()
{
new rndfire = random(sizeof(randomSpawns));
AddFire(randomSpawns[rndfire][0], randomSpawns[rndfire][1], randomSpawns[rndfire][2]);
return 1;
}
Re: error 035: argument type mismatch (argument 1) -
Robert_Crawford - 01.03.2012
No go my friend.
Re: error 035: argument type mismatch (argument 1) -
Walsh - 01.03.2012
Whoops, my bad. Post the
function.
Re: error 035: argument type mismatch (argument 1) -
Robert_Crawford - 01.03.2012
line 29
pawn Код:
forward AddFire(Float:x, Float:y, Float:z);
line 318 - 328
pawn Код:
public AddFire(Float:x, Float:y, Float:z)
{
new slot = GetFlameSlot();
if(slot == -1) {return slot;}
Flame[slot][Flame_Exists] = 1;
Flame[slot][Flame_pos][0] = x;
Flame[slot][Flame_pos][1] = y;
Flame[slot][Flame_pos][2] = z - Z_DIFFERENCE;
Flame[slot][Flame_id] = CreateObject(18689, Flame[slot][Flame_pos][0], Flame[slot][Flame_pos][1], Flame[slot][Flame_pos][2], 0.0, 0.0, 0.0);
return slot;
}
Re: error 035: argument type mismatch (argument 1) -
Stylock - 01.03.2012
pawn Код:
AddFire(randomSpawns[rndfire][0], randomSpawns[rndfire][1], randomSpawns[rndfire][2]);
That should look like this:
pawn Код:
AddFire(randomSpawns[rndfire][0][0], randomSpawns[rndfire][0][1], randomSpawns[rndfire][0][2]);
Re: error 035: argument type mismatch (argument 1) -
Robert_Crawford - 01.03.2012
Now will this only spawn the object in a group or will it spawn all of them