Blockland Forums > Modification Help

Parent?

Pages: (1/1)

xcruso:

Hey I need some help with this codes that's like this, GameConnection::incScore(..)
I have to understand them so i can make something out of them.

Bloxxed:

The Parent keyword is used with the namespace operator (::) to reference the previous definition of a function that has been overridden either through inheritance or packaging.


--- Code: ---package Parent_Example
{
function GameConnection::IncScore(%arguments)
{
parent::IncScore(%arguments);
//rest of code
        }
}
--- End code ---


Chrono:

Arguments for IncScore are as follows:

gameconnection (derp, it's a class function)
score

If you don't know how to set these up:
function GameConnection::IncScore(%client,%score)

Parent::IncScore(%client,%score)

xcruso:


--- Quote from: Chrono on August 07, 2011, 08:24:57 PM ---Arguments for IncScore are as follows:

gameconnection (derp, it's a class function)
score

If you don't know how to set these up:
function GameConnection::IncScore(%client,%score)

Parent::IncScore(%client,%score)

--- End quote ---

Yeah I kinda found out before you posted this, ty anyway to both of you.

Pages: (1/1)

Go to full version