The online racing simulator
Searching in All forums
(363 results)
T3charmy
S3 licensed
Nice update, Also something came to mind, Would it be possible to give Timers Names... This way we can unset timers?

Edit: Either I'm doing something wrong, or buttons(using new Button) don't seem to work in this release
Last edited by T3charmy, .
T3charmy
S3 licensed
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 !
T3charmy
S3 licensed
I say just go ahead and go on with PHP 5.4
T3charmy
S3 licensed
Quote from Dygear :Sorry, I'll fix that when I get home.




What do you mean by that? Do you mean only the first MCI packets information is given, or do you mean that the packet's Info only has one member, and that's the only thing that your getting?

First off, you might only get one Info item in that array because that is the last packet of the set to be sent, or there is only one client on the server. Secondly, the MCI function you defined will be fired one time for each packet in an MCI set, some times there is only 1 packet if there is less then 1 client.

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...
Last edited by T3charmy, .
T3charmy
S3 licensed
Alright Now I seem the be having trouble with


<?php 
    
public function onMCI(IS_MCI $MCI)
    {
        
var_export($MCI->Info);
        foreach (
$MCI->Info as $CompCar)
        {
?>

Only the first car in MCI Info gets called?
T3charmy
S3 licensed
Quote from Dygear :Let me know if that works out better for you.

Seems to be working perfectly fine. Thanks.

Edit:


Warning: call_user_func_array() expects parameter 2 to be array, null given in \PRISM\modules\prism_button.php on line 52

This seems to work fine...


<?php 
    
public function registerOnClick(Plugins $plugin$methodName$params NULL)
    {
        
$this->onClick = array($plugin$methodName);
        if(
$params != NULL)
            
$this->onClick[] = $params;
        
$this->BStyle |= ISB_CLICK;
    }
    public function 
click(IS_BTC $BTC)
    {
        if (!
is_array($this->onClick))
            return;

        switch (
count($this->onClick))
        {
            case 
3:
                
call_user_func_array(array($this->onClick[0], $this->onClick[1]), $this->onClick[2]);
            break;
            case 
2:
            default:
                
call_user_func($this->onClick$BTC$this);
            break;
        }
    }
?>

Last edited by T3charmy, .
T3charmy
S3 licensed
Is there a way to call a btn click function with params? such as


<?php 
registerOnClick
($this"ChaseClient('{$UName}', '{$CliUName}')")
?>

Last edited by T3charmy, .
T3charmy
S3 licensed
Quote from Dygear :Really? Why? Why are you handling NCN packets anyway?

I use it to get Player Cruise stats...

<?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'0170304ISB_DARK);
        
$this->Acc[$UName]->InitButton('HUD_Meters_Total'4170304ISB_DARK);
        
$this->Acc[$UName]->InitButton('HUD_Meters_Today'8170304ISB_DARK);
        
$this->Acc[$UName]->InitButton('HUD_Road_Name'90180204ISB_DARK 6);
        
$this->Acc[$UName]->InitButton('HUD_Road_Limit'94180204ISB_DARK);
        
$this->Acc[$UName]->UpdateStatGUI();
    }
?>

Also as for this error:
Quote :Notice: Indirect modification of overloaded property ClientHandler::$UName has no effect in <snip>\PRISM\modules\prism_plugins.php on line 257

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 == OR $cmd['accessLevel'] == -1)
            return 
TRUE;

        global 
$PRISM;
        
$ClientUName $this->getClientByUCID($UCID)->UName;
        
$adminInfo $PRISM->admins->getAdminInfo($ClientUName);
        return (
$cmd['accessLevel'] & $adminInfo['accessFlags']) ? TRUE FALSE;
    }
?>

Also; If you are intrested in seeing my insim and I'm online at [SC] Insim Dev Feel free to pass by
Last edited by T3charmy, .
T3charmy
S3 licensed
Quote from Dygear :It's really best if you leave PRISM's core alone, everything is programmed in a way for a reason, even the error handler. It's very hard for me to support code that I can't see, and even more so when your reporting bugs in code that is no longer mine because of the modifications that you've made.



As for the Indirect modification error, that's because of somewhere in your code you have modified UName some how. Check your plugins, and I'll need the whole error message next time so I can tell you where it's coming from, hopefully.



Yeah, that's a known bug. Not really sure how I am going to fix that yet. I ask for the connections in the case of PRISM starting while there is already a session in progress and I don't have their information yet. The request is needed so that I can populate their information within the state module. I'll probably check to see if there is a session in progress before I request an NCN packet.

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...
T3charmy
S3 licensed
especially for almost 10 years ... This virtual world I play, is well beyond 300k users :P ... and its nearing almost 3 years...
T3charmy
S3 licensed
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)
?>

Last edited by T3charmy, .
T3charmy
S3 licensed
Quote from Dygear :Did you modify PRISM's error handler?

Yes I did...

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 == OR $cmd['accessLevel'] == -1)
            return 
TRUE;

        global 
$PRISM;
        
$adminInfo $PRISM->admins->getAdminInfo($this->getClientByUCID($UCID)->UName);
        return (
$cmd['accessLevel'] & $adminInfo['accessFlags']) ? TRUE FALSE;
    }
?>

Last edited by T3charmy, .
T3charmy
S3 licensed
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
Last edited by T3charmy, .
T3charmy
S3 licensed
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
T3charmy
S3 licensed
Quote from cargame.nl :No SSD. You are out.

thats after I upgrade ram :P
New Comp... Opinions?
T3charmy
S3 licensed
  • COOLER MASTER HAF 912 RC-912-KKN1 Black SECC/ ABS Plastic ATX Mid Tower Computer Case
  • GIGABYTE GA-970A-D3 AM3+ AMD 970 SATA 6Gb/s USB 3.0 ATX AMD Motherboard
  • GIGABYTE GV-N560OC-1GI GeForce GTX 560 Ti (Fermi) 1GB 256-bit GDDR5 PCI Express 2.0 x16 HDCP Ready SLI Support Video Card
  • COOLER MASTER eXtreme Power Plus RS-550-PCAR-E3 550W ATX12V V2.3 SLI Ready CrossFire Ready Power Supply
  • AMD FX-6100 Zambezi 3.3GHz Socket AM3+ 95W Six-Core Desktop Processor FD6100WMGUSBX
  • G.SKILL Ripjaws Series 4GB (2 x 2GB) 240-Pin DDR3 SDRAM DDR3 1600 (PC3 12800) Desktop Memory Model F3-12800CL8D-4GBRM
  • Seagate Barracuda ST500DM002 500GB 7200 RPM SATA 6.0Gb/s 3.5" Internal Hard Drive -Bare Drive
I do plan to upgrade to either 8 or 16 GB ram here in close future...
T3charmy
S3 licensed
Quote from bananas111 :Can you help?

Not sure ... haven't used Lapper since the last version of this add-on was released.. but I will surely help you once I look over my code again.
T3charmy
S3 licensed
Quote from LFSCruise :Is it possible to make each player to show only those cars which he has have?

As
ISP_PLC, // 53 - instruction : player cars

Quote from Krayy :Very soon it will be..watch the forums

Once Krayy finishes new packets I plan to rewrite a decent amount of Plugin Code, and fix all of the bugs found in this forum.
T3charmy
S3 licensed
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...

Edit: looking on how to add new packets now so...
Last edited by T3charmy, .
T3charmy
S3 licensed
Quote from Dygear :Release what you have. And then work on version 2.0. It's how the world works , just look at PRISM's core.

What I have is released.... And as for new link, its coming soon.
T3charmy
S3 licensed
Quote from Dygear :So a bad install of PHP was causing the error?

Seems like it... not sure why... but oh well :P
T3charmy
S3 licensed
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...
T3charmy
S3 licensed
Quote from Dygear :if it closes right after, how do you know where the error is coming from?

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?
Last edited by T3charmy, .
T3charmy
S3 licensed
Quote from Dygear :Ok. I'll keep an eye out for it. But please, once it happens again, post the call stack as reported by PRISM's error handler.

it happens everytime for me, but for some reason, prism closes right after...
T3charmy
S3 licensed
Quote from Dygear :I'll have a look at it later, I'm going to sleep now. Just a note, I've never had that problem, so I don't really know what could be causing it. So if you can give me more information about the state of PRISM, and plugins running, the call stack trace that PRISM gives, that would be helpful.

I got a fresh install and it just started doing that :/
FGED GREDG RDFGDR GSFDG