Author Topic: Parent?  (Read 314 times)

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.

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: [Select]
package Parent_Example
{
function GameConnection::IncScore(%arguments)
{
parent::IncScore(%arguments);
//rest of code
        }
}

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)

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)

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