"Warning 209: function "cmd_enter" should return a value." Urgent help needed!
#1

Alright, so basically I'm trying to make /enter and /exit's instead of using the yellow markers. As of now I've got the info sign that says "/enter to enter", or something. Anyhow, when I do the command it self, I get the warning "warning 209: function "cmd_enter" should return a value", as well as "warning 209: function "cmd_exit" should return a value". I'm using zcmd by the way.

This is the commands:
Code:
COMMAND:enter(playerid,params[])
{
	if(IsPlayerInRangeOfPoint(playerid,10,1552.6899,-1675.4779,16.1953))
	            {
	                SetPlayerPos(playerid,246.3839,109.0597,1003.2188);
	                return 1;
	            }
}

COMMAND:exit(playerid,params[])
{
	if(IsPlayerInRangeOfPoint(playerid,10,246.3839,109.0597,1003.2188))
	            {
	                SetPlayerPos(playerid,1552.6899,-1675.4779,16.1953);
	                return 1;
	            }
	        //other exit commands go here if(player......
}
Fyi, I'm a total noob, so will probably need quite detailed information/help.

Thanks a lot.
Reply
#2

pawn Code:
COMMAND:enter(playerid,params[])
{
    if(IsPlayerInRangeOfPoint(playerid,10,1552.6899,-1675.4779,16.1953))
                {
                    SetPlayerPos(playerid,246.3839,109.0597,1003.2188);
                   
                }
      return 1;//Should be just before command closing bracket
}
Reply
#3

Oh god... Such a small mistake, and it... Thanks a lot! Told you I were a n00b.
Reply
#4

pawn Code:
COMMAND:enter(playerid,params[])
{
    if(IsPlayerInRangeOfPoint(playerid,10,1552.6899,-1675.4779,16.1953))
    {
        SetPlayerPos(playerid,246.3839,109.0597,1003.2188);
    }
    return true;
}

COMMAND:exit(playerid,params[])
{
    if(IsPlayerInRangeOfPoint(playerid,10,246.3839,109.0597,1003.2188))
    {  
        SetPlayerPos(playerid,1552.6899,-1675.4779,16.1953);
   
    }
    return true;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)