Quote:
|
Originally Posted by Tom
In working with Relic, I have encountered numerous programming problems that I do believe shouldn't have bothered me, but has!
For instance, player.func() defined in the ( serverside ) join command with a clientside segment doesn't work:
Example:
PHP Code:
Class pfunc:
function onCreated()
{
echo("Class DID join");
}
//#CLIENTSIDE
public function test()
{
this.chat = "test";
}
PHP Code:
Weapon anything:
function onCreated()
{
player.join("pfunc");
}
//#CLIENTSIDE
function onCreated()
{
player.test(); // GraalScript: Function test not found in script of Weapon anything
player.pfunc::test(); // GraalScript: Function test not found in script of Weapon anything
}
As seen in these codes, the player class does not actually carry over the class functions...
|
onCreated() serverside is called when the WNPC is updated. onCreated() clientside is called when the player logs into the server (or receives the weapon.) The only way your script would function correctly would be if you hit the update button the exact milisecond the player logs in, before onCreated() clientside is called.