I also agree to the fact better now then when there is a bunch of plugins being made and have to be converted at a later date... Would be much more of a pain in the neck then...
Edit: ahh I see this: Online at: PRISM 0.5.0 on PHP 5.4.0 Nice !
there was 3 people on the track.. it used to work fine, but now it doesnt, just sends the first client that is in the info array... anything after it is ignored... hmm I just thought of something to check on my end... Will double check that see if that is causing my issue, which may explain why its only doing first user...
EDIT: Yep, the problem with MCI was completely my fault, was using a return instead of a continue...
<?php public function onClientConnect(IS_NCN $NCN) { if (empty($NCN->UName) || isset($this->conns[$this->curHostID]['Client'][$NCN->UCID])) // Checking if UCID is used Quick fix for Double NCN packet return PLUGIN_CONTINUE; $UName = strtolower($NCN->UName); $this->conns[$this->curHostID]['Client'][$NCN->UCID] = $UName; $this->Acc[$UName] = new Account($NCN->UCID, $UName, $NCN->PName); $this->Acc[$UName]->InitButton('HUD_Cash', 0, 170, 30, 4, ISB_DARK); $this->Acc[$UName]->InitButton('HUD_Meters_Total', 4, 170, 30, 4, ISB_DARK); $this->Acc[$UName]->InitButton('HUD_Meters_Today', 8, 170, 30, 4, ISB_DARK); $this->Acc[$UName]->InitButton('HUD_Road_Name', 90, 180, 20, 4, ISB_DARK + 6); $this->Acc[$UName]->InitButton('HUD_Road_Limit', 94, 180, 20, 4, ISB_DARK); $this->Acc[$UName]->UpdateStatGUI(); } ?>
Also as for this error:
I tried this, and the error is gone:
<?php protected function canUserAccessCommand($UCID, $cmd) { # Hosts are automatic admins so due to their nature, they have full access. # Commands that have no premission level don't require this check. if ($UCID == 0 OR $cmd['accessLevel'] == -1) return TRUE;
I must have misunderstood you, I haven't modified the core in anyway, I just have an additional error handler in my plugin. When I get a problem with modules, first thing I do is go and download fresh copy of PRISM...
As for the UName, I have found that problem, and I think I've fixed it...
Looking forward to that bug being fixed, really messes with my cruise plugin by calling NCN twice...
Ok, there is a really annoying bug, When a user is on the server already when Insim starts, their ISP_NCN packet sends twice, so anything done on PRISM connect(While that client is on the server), sends twice...
found the culprit:
<?php # Get information on the clients & players, and their current race state. # These are redundant because of the above request for an ISM packet. # They must remain in order to avoid an error state in some plugins. $ISP->SubT(TINY_NCN)->Send(); # get all connections (ISP_NCN) ?>
First one is when insim starts, 2nd is when ever a command is typed...
I found out that I can ignore the errors(surpressed errors that is) in my custom handler using
if (error_reporting() === 0)
return true;
so... Gonna add that and now it won't bug me when ever it hits a suppressed error
Edit2: 2nd error is actually from
<?php protected function canUserAccessCommand($UCID, $cmd) { # Hosts are automatic admins so due to their nature, they have full access. # Commands that have no premission level don't require this check. if ($UCID == 0 OR $cmd['accessLevel'] == -1) return TRUE;
I've tried reinstalling PHP, disabling the HTTP PRISM function, and keep getting this error:
ERROR: [8] fwrite(): send of 252 bytes failed with errno=10035 A non-blocking socket operation could not be completed immediately.
. prism_hosts.php:1022
And:
ERROR: [8] Indirect modification of overloaded property ClientHandler::$UName has no effe
problem is my harddrive on my old gaming rig died... gave what was left to my dad... and I'm getting a whole new rig ... But kinda of on a budget atm so...
On the Processor ... I have been researching processor for last month... from reviews and for the price... I'm gonna stick with the amd
Alright, I received a reply back from Gai, He said that I could Continue development on this for now, for now, I plan to just keep it simple as possible such as adding access to new packets! (If you don't hear back from me in the next few hours... I have probably given up...
Hello guys, I am back! I am currently debating on whether I am gonna either scrap the whole project, and re code from scratch, or get rid of crummy code, and make it 1000x better...
Alright... reinstalled PHP once again, and its working again... thanks anyways :P
Edit, alright well while updating my plugin, in the NCN packet, the clients name is all lowercase, but when you call getClientByPLID or the other related functions, it still returns their username in normal case... so, possible for you to make the ->UName lower case in the getClientByPLID related functions?