How do i fix this warning?
#1

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
Reply
#2

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; }
Reply
#3

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);
Reply
#4

Thanks, them warnings have now gone
Reply
#5

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..
Reply
#6

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.

}
Reply
#7

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)