invalid expression, assumed zero
#1

Either I'm stupid or I really do not see what problem is…

Have 1 error

Please Help Guys ( Thanks )



(17103) : error 029: invalid expression, assumed zero


//------------------------------Gates open-------------------------------------------

CMD:gateopen(playerid, params[])
{
if(PlayerInfo[playerid][pMember] == 4 || PlayerInfo[playerid][pLeader] == 4)
{
if (IsPlayerInRangeOfPoint(playerid,50,996.8564453125 , -2112.1943359375, 12.09375))
{
MoveDynamicObject(h2kgate1,993.50140380859, -2111.6450195313, 6.09375, 1.5);
MoveDynamicObject(h2kgate2,996.8564453125, -2112.1943359375, 6.09375, 1.5);
SetTimer("GateClose2", 6000, 0);
SendClientMessage(playerid, TEAM_AZTECAS_COLOR,"* The gate is opened and will close in 6 seconds.");
GetPlayerName(playerid, sendername, sizeof(sendername));
new string[ 128 ];
format(string, sizeof(string), "* %s takes his/her remote and opens the gate.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPL E,COLOR_PURPLE);
}
else { SendClientMessage(playerid, COLOR_RED,"* Destination is too far."); }
}

public GateClose2(playerid) <------ Problem is here Line 17103 !
;{
MoveDynamicObject(h2kgate1,993.50140380859, -2111.6450195313, 12.09375, 1.5);
MoveDynamicObject(h2kgate2,996.8564453125, -2112.1943359375, 12.09375, 1.5);
return 1;
}
}
Reply
#2

You can't use it in such a way, just try using "GateClose2" or not defining the "GateClose2" as a public function..
Reply
#3

@JasonRiggs

No i tryed it
Always the same code
Reply
#4

Quote:
Originally Posted by ******
Посмотреть сообщение
Indent your code.
What u mean with Indent ?
Reply
#5

pretty sure that little semicolon's not supposed to be there..

Код:
CMD:gateopen(playerid, params[])
{
	if(PlayerInfo[playerid][pMember] == 4 || PlayerInfo[playerid][pLeader] == 4)
	{
		if (IsPlayerInRangeOfPoint(playerid,50,996.8564453125 , -2112.1943359375, 12.09375))
		{
			MoveDynamicObject(h2kgate1,993.50140380859, -2111.6450195313, 6.09375, 1.5);
			MoveDynamicObject(h2kgate2,996.8564453125, -2112.1943359375, 6.09375, 1.5);
			SetTimer("GateClose2", 6000, 0);
			SendClientMessage(playerid, TEAM_AZTECAS_COLOR,"* The gate is opened and will close in 6 seconds.");
			GetPlayerName(playerid, sendername, sizeof(sendername));
			new string[ 128 ];
			format(string, sizeof(string), "* %s takes his/her remote and opens the gate.", sendername);
			ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPL E,COLOR_PURPLE);
		}
		else 
		{
			SendClientMessage(playerid, COLOR_RED,"* Destination is too far.");
		}
	}
}

public GateClose2(playerid) <------ Problem is here Line 17103 !
{
	MoveDynamicObject(h2kgate1,993.50140380859, -2111.6450195313, 12.09375, 1.5);
	MoveDynamicObject(h2kgate2,996.8564453125, -2112.1943359375, 12.09375, 1.5);
	return 1;
}
Reply
#6

Remove it; from public GateClose2 (playerid); to be:
PHP код:
public GateClose2(playerid)
{
    
MoveDynamicObject(h2kgate1,993.50140380859, -2111.645019531312.093751.5);
    
MoveDynamicObject(h2kgate2,996.8564453125, -2112.194335937512.093751.5);
    return 
1;

Reply
#7

Quote:
Originally Posted by Criniti
Посмотреть сообщение
Remove it; from public GateClose2 (playerid); to be:
PHP код:
public GateClose2(playerid)
{
    
MoveDynamicObject(h2kgate1,993.50140380859, -2111.645019531312.093751.5);
    
MoveDynamicObject(h2kgate2,996.8564453125, -2112.194335937512.093751.5);
    return 
1;

Done but have the same Error
Reply
#8

Number of braces opened in cmd_gateopen = 4
Number of braces closed in cmd_gateopen = 3
Reply
#9

Quote:
Originally Posted by iSpark
Посмотреть сообщение
Number of braces opened in cmd_gateopen = 4
Number of braces closed in cmd_gateopen = 3
Always the same error Code i tryed all but no Chance idk why ….
Reply
#10

Код:
#define function%0(%1) forward %0(%1); public %0(%1)


function GateClose2() 
{ 
    MoveDynamicObject(h2kgate1,993.50140380859, -2111.6450195313, 12.09375, 1.5); 
    MoveDynamicObject(h2kgate2,996.8564453125, -2112.1943359375, 12.09375, 1.5); 
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)