The online racing simulator
Searching in All forums
(5 results)
DK-77
S2 licensed
Okay, thanks Victor.

I never planned on putting any code into the core, was just tinkering and playing around with some ideas until 0.3.0 was released

I shall wait patiently
DK-77
S2 licensed
Could I ask a question?

Until the html part is ready I want to call a function (ABLAS_main) in the plugin I've called ABLAS from the main loop.

I have two connections S2L and MID

within the main loop after this line
(line 504) foreach ($this->hosts as $hostID => $host)

I use
$this->plugins['ABLAS']->ABLAS_main();

It sort of works, but only ever executes the function as the S2L conection.


What is the correct method to call a plugin function from the main loop?


Or have I gone completely off-course... sorry I've spend hours trying to figure it out and now can't see the wood from the trees

Many Thanks
DK-77
S2 licensed
Quote from Dygear :
The web interface is really Victors field, but I like that your using it .

The html is my own, I've seen that Victors branch has html, but haven't had a chance to have a look yet - but I will. Most of the my code was orginally using Ripnets phpInsim (which I got out of my depth with), and I've transfered it over to PRISM

Quote from Dygear :
It takes balls of steel to share code these days, so thank you very much for the contribution.

And thank you for PRISM , and hopefully I can have get a usable plugin ready to share for your release
DK-77
S2 licensed
Hi,

Firstly, excellent work with PRISM, I'm looking forward to see the development, secondly sorry if this post dosen't belong here, and lastly I am very much a hobby programmer, so I fall into the little knowledge and dangerous catergory

I'm trying to create something to help the Absolute Beginner League with the Le-mans series of races, where the week leading up to the event is the qualification time, and on race night the grid is automatically sorted.

Also when the open league has more than 32 racers, the event can be set over two servers. Qualification can be done on either server then the grid re-ordered to the qualifing times.

Everything is administered via a web page, so racers can see what is happening and where.


I realise 0.3 is due imminently, but though I'd share my experience.

The registerPacket works excellent for ISP_NCN, ISP_CNL, ISP_NPL, ISP_LAP, but I hit a few problems with the ISP_REO package.

I couldn't get or construct any sort of packet with $PLID in IS_REO, so I changed it to this. (unfortunately, due to skills, I'm still looking into a way of tyding this up)

const PACK = 'CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC';
const UNPACK = 'CSize/CType/CReqI/CNumP/CPLID01/CPLID02/CPLID03/CPLID04/CPLID05/CPLID06/..
..CPLID07/CPLID08/CPLID09/CPLID10/CPLID11/CPLID12/CPLID13/CPLID14/CPLID15/..
..CPLID16/CPLID17/CPLID18/CPLID19/CPLID20/CPLID21/CPLID22/CPLID23/CPLID24/..
..CPLID25/CPLID26/CPLID27/CPLID28/CPLID29/CPLID30/CPLID31/CPLID32';
public $Size = 36; // 36
public $Type = ISP_REO;// ISP_REO
public $ReqI; // 0 unless this is a reply to an TINY_REO request
public $NumP; // number of players in race
public $PLID01; // all PLIDs in new order
public $PLID02;
public $PLID03;
public $PLID04;
public $PLID05;
public $PLID06;
public $PLID07;
public $PLID08;
public $PLID09;
public $PLID10;
public $PLID11;
public $PLID12;
public $PLID13;
public $PLID14;
public $PLID15;
public $PLID16;
public $PLID17;
public $PLID18;
public $PLID19;
public $PLID20;
public $PLID21;
public $PLID22;
public $PLID23;
public $PLID24;
public $PLID25;
public $PLID26;
public $PLID27;
public $PLID28;
public $PLID29;
public $PLID30;
public $PLID31;
public $PLID32;



The only other thing I run into was having some sort of call-back for external commands, to elaborate on the html page I have 'send msg' & 'send re-order' and use MySql to store the command. I then used the ISP_NLP request (as it happens most often) to check the databse and process the commands - I can see this is proberbly not the best way to go about this.




I've attached my latest development pakage, if its of any interest..
DK-77
S2 licensed
Sounds Fun, but I can't make it until 21:00

Will join then
FGED GREDG RDFGDR GSFDG