Small question about returns
#2

Yes there is a difference:
in the first code.
pawn Код:
public OnPlayerPickUpDynamicPickup(playerid, pickupid)
{
    if(pickupid == RandPick[0])
    {
        cmd_cnr(playerid,"");
        return 1;//returning to 1 ( Ending OnPlayerPickUpDynamicPickup)
    }
    //code here will not be executed.
    return 1;//returning to 1
}
in the second code
pawn Код:
public OnPlayerPickUpDynamicPickup(playerid, pickupid)
{
    if(pickupid == RandPick[0])
    {
        cmd_cnr(playerid,"");
    }
    //whole code will be read when callback is called
    return 1;//returning to 1
}
Reply


Messages In This Thread
Small question about returns - by biker122 - 18.09.2014, 09:43
Re: Small question about returns - by IamPRO - 18.09.2014, 10:03
Re: Small question about returns - by biker122 - 18.09.2014, 11:58
Re: Small question about returns - by Stinged - 18.09.2014, 12:06
Re: Small question about returns - by biker122 - 18.09.2014, 12:16
Re: Small question about returns - by IamPRO - 18.09.2014, 13:07
Re: Small question about returns - by biker122 - 18.09.2014, 13:32
Re: Small question about returns - by Vince - 18.09.2014, 13:45
Re: Small question about returns - by biker122 - 18.09.2014, 13:48

Forum Jump:


Users browsing this thread: 1 Guest(s)