Blockland Forums > Modification Help
Calling A Function In A Function
<< < (5/5)
Ipquarx:

--- Quote from: jes00 on October 12, 2011, 07:37:19 PM ---I need it to do something if their energy is at 100.
--- End quote ---

--- Code: ---function One(%client)
{
    if(%client.player.getEnergyLevel() == 100)
        schedule($Pref::Mod::Delay, 0, "One", %client);
}
--- End code ---
You mean like that?
jes00:

--- Quote from: Ipquarx on October 13, 2011, 10:59:56 AM ---
--- Code: ---function One(%client)
{
    if(%client.player.getEnergyLevel() == 100)
        schedule($Pref::Mod::Delay, 0, "One", %client);
}
--- End code ---
You mean like that?

--- End quote ---
Would not it need to be like this?

--- Code: ---function One(%client)
{
    if(%client.player.getEnergyLevel() == 100)
    {
        schedule($Pref::Mod::Delay, 0, "One", %client);
     }
}

--- End code ---
Amade:

--- Quote from: jes00 on October 14, 2011, 07:16:00 AM ---Would not it need to be like this?
--- Code: ---function One(%client)
{
    if(%client.player.getEnergyLevel() == 100)
    {
        schedule($Pref::Mod::Delay, 0, "One", %client);
     }
}

--- End code ---

--- End quote ---
That way is preferred, but both will work.
jes00:

--- Quote from: Amade on October 14, 2011, 09:58:43 AM ---That way is preferred, but both will work.

--- End quote ---
Thanks.
Navigation
Message Index
Previous page

Go to full version