SA-MP Forums Archive
automatic gate code errors - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Server (https://sampforum.blast.hk/forumdisplay.php?fid=6)
+--- Forum: Server Support (https://sampforum.blast.hk/forumdisplay.php?fid=19)
+--- Thread: automatic gate code errors (/showthread.php?tid=560021)



automatic gate code errors - MasonPlay - 26.01.2015

This is the first time i try to add something in pawno. I appreaciate the help.


Code:
Код:
public OnGameModeInit()
{
	SetGameModeText("Texture Studio");
	ShowPlayerMarkers(1);
	ShowNameTags(1);
	AllowAdminTeleport(1);
	UsePlayerPedAnims();

	AddPlayerClass(265,1958.3783,1343.1572,15.3746,270.1425,0,0,0,0,-1,-1);
	
	MyGate1 = CreateObject(976, 2034.64795, 1339.47156, 9.66843,);
	SetTimer("GateCheck",1000,1);
	return 1;
}
public GateCheck()
{
    new MyGate1Open;
    for(new playerid; playerid<MAX_PLAYERS; playerid++)
    {
        if(IsPlayerInRangeOfPoint(playerid,10.0,2034.64795, 1339.47156, 9.66843)MyGate1Open=1;
    }
    //MyGate1
    if(MyGate1Open)MoveObject(MyGate1,2034.64795, 1339.47156, 9.66843); //These are the coordinates of the gate if it were in it's opened state.
    else MoveObject(MyGate1,2034.96948, 1333.53650, 9.66843);//These are the coordinates of the gate if it were in it's closed state.
}
erros:

: error 029: invalid expression, assumed zero
: error 035: argument type mismatch (argument 5)
: error 001: expected token: ")", but found "-identifier-"
: warning 202: number of arguments does not match definition
: warning 202: number of arguments does not match definition

Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


3 Errors.


Re: automatic gate code errors - silenthill - 26.01.2015

pawn Код:
CreateObject(modelid, Float:X, Float:Y, Float:Z, Float:rX, Float:rY, Float:rZ, Float:DrawDistance)

MyGate1 = CreateObject(976, 2034.64795, 1339.47156, 9.66843,);  << miss