View Single Post
  #1  
Old 05-19-2007, 04:09 PM
JkWhoSaysNi JkWhoSaysNi is offline
Ruler of the graalaxy
Join Date: Feb 2005
Location: Great Britain
Posts: 488
JkWhoSaysNi is on a distinguished road
Send a message via ICQ to JkWhoSaysNi
Why doesn't this work now?

2 days ago (the last time i used this script) it worked great. Now it's not, even though it hasn't been changed.

I've created an IRC style chat system which uses my associative array class to store the channels and users.

PHP Code:
public function create_channel(channelnametopicowner) {
  if (!
this.channels.has(channelname)) {
    
channel = new TStaticVar();
    
channel.join("chat_channel");
    
channel.create(topicownerchannelname);
    echo(
"a:"@channel.channelname);
    
this.channels.put(channelname,channel);
    echo(
"b:"@this.channels.item(channelname).channelname);
  }

This worked great before. the first echo (a) works fine, and echos the channel name as it should, but after it's been put into the associative array channel is no longer accessible (b). This was not the case 2 days ago when it worked as expected.

I don't know what's wrong, the associative array class hasn't been changed and it's used in other scripts which are still working fine. The only difference is, this is the only place it's being used to store objects.
__________________

Coming soon (Hopefully:P)
Reply With Quote