Should return a value but already returns a value?!
#1

Hello guys its me again and im really confused. I know this is not actually a problem but heres my code.

it tells me that cmd_setrentable should return a value. Anyone has any idea ?

Код:
CMD:setrentable(playerid,params[])
{
    new playName[MAX_PLAYER_NAME]; 
    GetPlayerName(playerid, playName, MAX_PLAYER_NAME);
    for(new i = 0; i < MHOUSE; i++) 
        if(!strcmp(hInfo[i][howner], playName, false)) 
        {
            if(hInfo[i][rentable] == false)
			{
			    hInfo[i][rentable] = true;
			    SCM(playerid,COLOR_GREY,"You should now set rent price by /setrentprice");
			    savehouse(i);
			    return 1;
			}
            if(hInfo[i][rentable] == true)
			{
			    hInfo[i][rentable] = false;
			    SCM(playerid,COLOR_GREY,"House is now not rentable.");
			    savehouse(i);
			    return 1;
			}
        }
	}
	return 1;
}
Reply


Messages In This Thread
Should return a value but already returns a value?! - by grymtn - 03.08.2017, 16:52
Re: Should return a value but already returns a value?! - by Vince - 03.08.2017, 17:04
Re: Should return a value but already returns a value?! - by grymtn - 03.08.2017, 17:17

Forum Jump:


Users browsing this thread: 1 Guest(s)