How do i fix this warning? -
Stryke - 22.08.2010
I keep getting this warning and im guessing this is whats causing my gates to not move automatically
(87

: warning 202: number of arguments does not match definition
(87

: warning 202: number of arguments does not match definition
(879) : warning 202: number of arguments does not match definition
(879) : warning 202: number of arguments does not match definition
The lines giving these errors are marked below
pawn Код:
public GateCheck()
{
new admingate1Open;
for(new playerid; playerid<MAX_PLAYERS; playerid++)
{
if(IsPlayerInRangeOfPoint(playerid,5.0,2220.3957,-1139.3205,25.6949))admingate1Open=1;
}
//AdminGate Los Santos
ERROR GIVEN HERE if(admingate1Open)MoveObject(admingate1,2227.763428, -1146.743164, 26.401253, 0.0000, 0.0000, 341.9518); //These are the coordinates of the gate if it were in it's opened state.
AND HERE else MoveObject(admingate1,2220.218018, -1144.315796, 26.401253, 0.0000, 0.0000, 341.9518);//These are the coordinates of the gate if it were in it's closed state.
}
Thanks for any of you who try to help me out
Re: How do i fix this warning? -
Typhome - 22.08.2010
Use { and }
if(admingate1Open) { MoveObject(admingate1,2227.763428, -1146.743164, 26.401253, 0.0000, 0.0000, 341.951

; }
else { MoveObject(admingate1,2220.218018, -1144.315796, 26.401253, 0.0000, 0.0000, 341.951

; }
Re: How do i fix this warning? -
dax123 - 22.08.2010
Quote:
Originally Posted by Stryke
I keep getting this warning and im guessing this is whats causing my gates to not move automatically
(87  : warning 202: number of arguments does not match definition
(87  : warning 202: number of arguments does not match definition
(879) : warning 202: number of arguments does not match definition
(879) : warning 202: number of arguments does not match definition
The lines giving these errors are marked below
pawn Код:
public GateCheck() { new admingate1Open; for(new playerid; playerid<MAX_PLAYERS; playerid++) { if(IsPlayerInRangeOfPoint(playerid,5.0,2220.3957,-1139.3205,25.6949))admingate1Open=1; } //AdminGate Los Santos ERROR GIVEN HERE if(admingate1Open)MoveObject(admingate1,2227.763428, -1146.743164, 26.401253, 0.0000, 0.0000, 341.9518); //These are the coordinates of the gate if it were in it's opened state. AND HERE else MoveObject(admingate1,2220.218018, -1144.315796, 26.401253, 0.0000, 0.0000, 341.9518);//These are the coordinates of the gate if it were in it's closed state. }
Thanks for any of you who try to help me out 
|
warning 202: number of arguments does not match definition
pawn Код:
//reference
MoveObject(objectid, Float:X, Float:Y, Float:Z, Float:Speed);
pawn Код:
//your usage
MoveObject(admingate1,2220.218018, -1144.315796, 26.401253, 0.0000, 0.0000, 341.9518);
Re: How do i fix this warning? -
Stryke - 22.08.2010
Thanks, them warnings have now gone
Re: How do i fix this warning? -
SaW_[VrTx] - 22.08.2010
pawn Код:
public GateCheck()
{
new admingate1Open;
for(new playerid; playerid<MAX_PLAYERS; playerid++)
{
if(IsPlayerInRangeOfPoint(playerid,5.0,2220.3957,-1139.3205,25.6949))admingate1Open=1;
}
//AdminGate Los Santos
ERROR GIVEN HERE if(admingate1Open)MoveObject(admingate1,2227.763428, -1146.743164, 26.401253, 5); //These are the coordinates of the gate if it were in it's opened state.
AND HERE else MoveObject(admingate1,2220.218018, -1144.315796, 26.401253, 5);//These are the coordinates of the gate if it were in it's closed state.
}
EDIT: Too late..
Re: How do i fix this warning? -
Stryke - 22.08.2010
I got another issue with the gate now
The issue is that once i go through the gate, it wont re-open so that i can get out, how do i fix that, does it somehow need to loop or something?
pawn Код:
public GateCheck()
{
new admingate1Open;
for(new playerid; playerid<MAX_PLAYERS; playerid++)
{
if(IsPlayerInRangeOfPoint(playerid,5.0,2220.3957,-1139.3205,25.6949))admingate1Open=1;
}
//AdminGate Los Santos
if(admingate1Open)MoveObject(admingate1,2227.763428, -1146.743164, 26.401253, 0.5); //These are the coordinates of the gate if it were in it's opened state.
else MoveObject(admingate1,2220.218018, -1144.315796, 26.401253, 0.5);//These are the coordinates of the gate if it were in it's closed state.
}
Re: How do i fix this warning? -
Stryke - 22.08.2010
Quote:
Originally Posted by SaW_[VrTx]
pawn Код:
public GateCheck() { new admingate1Open; for(new playerid; playerid<MAX_PLAYERS; playerid++) { if(IsPlayerInRangeOfPoint(playerid,5.0,2220.3957,-1139.3205,25.6949))admingate1Open=1; } //AdminGate Los Santos ERROR GIVEN HERE if(admingate1Open)MoveObject(admingate1,2227.763428, -1146.743164, 26.401253, 5); //These are the coordinates of the gate if it were in it's opened state. AND HERE else MoveObject(admingate1,2220.218018, -1144.315796, 26.401253, 5);//These are the coordinates of the gate if it were in it's closed state. }
EDIT: Too late..
|
Thanks

at least you tried to help