Problems with elses and ifs
#1

Hey, sorry for creating this thread for such a small problem, but I am completely demolished by it, I just recently got back into scripting as just a tiny hobby to spend time with, makes me feel good when I see that I made things by entering letters.

Basically. Code:
PHP код:
CMD:enterhouse(playeridparams[])
{
        if(
IsPlayerInRangeOfPoint(playerid452007.296631226.5278310.66455))
        {
        
SetPlayerPos(playerid2049.0613941.1595, -2.0587);
        }
            if(
GetPlayerState(playerid) !=1); //line 415
        
{
        
SendClientMessage(playerid0xE30000FF"[ERROR] You must be on foot to enter the house!");
                }
        else 
//line 419
        
{
        
SendClientMessage(playerid0xE30000FF"[ERROR] You are not near the house door!");
        }
        return 
1;

THe errors are on the lines
415 - empty statement
419 - invalid expression, assumed zero

Basically what I want to do is the game to deny me if I want to enter my house while in my car
I also took a wild guess with the !=1 because ! means no and = means equal, so not equal 1
Thanks in advance, boys
Reply


Messages In This Thread
Problems with elses and ifs - by Bek_Loking - 09.03.2017, 20:02
Re: Problems with elses and ifs - by Vince - 09.03.2017, 20:30
Re: Problems with elses and ifs - by Bek_Loking - 09.03.2017, 20:33
Re: Problems with elses and ifs - by Bek_Loking - 09.03.2017, 20:56
Re: Problems with elses and ifs - by ISmokezU - 09.03.2017, 21:02
Re: Problems with elses and ifs - by Bek_Loking - 09.03.2017, 21:12

Forum Jump:


Users browsing this thread: 3 Guest(s)