The online racing simulator
Syntax Change 0.3.0 -> 0.3.1 (Registered Commands)
There is going to be a syntax change from version 0.3.1 onwards on the order an number of args passed to the plugin's method.


<?php 
class syntaxChange
{
    const 
NAME 'Sytanx Change Example';
    const 
AUTHOR "Mark 'Dygear' Tomlin";
    const 
VERSION '0.3.1';
    const 
DESCRIPTION 'Illustrates the change from 0.3.0 to 0.3.1';
    
    public function 
__construct()
    {
        
$this->registerSayCommand('prism syntax''syntaxChange''Just an example function.');
    }
    
    public function 
syntaxChange($cmd$ucid)
    {
        
var_dump($cmd);
        
var_dump($ucid);
    }
}
?>

This changes from the old style:

<?php 
public function syntaxChange($cmd$plid$ucid$packet)
?>


<?php 
public function syntaxChange($cmd$ucid)
?>

This change was made due to the fact that only clients can issue commands, AI does not speak so it made no sense to even have the PLID mentioned. That and the functions are permission based, off the client's Username that's obtainable via the UCID very quickly. I may allow for a clone of the packet struct to be returned to any method but that would be via another septate function call, as in:

<?php 
$this
->getPacketStruct(); // Will always have a clone of the current packet PRISM is working on.
?>

There might be further changes where the UCID is replaced by the UName of the client, and I'll keep you posted.

FGED GREDG RDFGDR GSFDG