View Single Post
  #2  
Old 01-10-2006, 08:06 PM
ApothiX ApothiX is offline
Okiesmokie
Join Date: May 2004
Posts: 1,447
ApothiX is on a distinguished road
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.
__________________


[06:24:19] * Parts: Skyld (i=silent@unaffiliated/skyld) ("Perhaps Okiesmokie did not realise that I like the boys. ")
Reply With Quote