Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #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
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 07:52 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.