Results 1 to 3 of 3

Thread: .server() and Channel handlers

  1. #1
    Worms no more! Free fun! Dodgy's Avatar
    Join Date
    Feb 2003
    Location
    Sydney
    Posts
    8,275

    .server() and Channel handlers

    Hi all,

    How do I get the server method to work with channel handlers? I'm tried

    myserver=mychannel.server(SERVER_CHANNEL_H,i);
    myserver=item.server(SERVER_CHANNEL_H,i);

    but neither return anything other than 'nil' . Anyone any ideas? Or is this a bug?

    Thanks,
    Mike
    Last edited by Dodgy; 02-10-2007 at 06:36 AM.
    Push the software, don't let it push YOU!
    My own plugins and work:www.mikegreen.name
    LaptopSetup:corei7 2.4GHz nvidia GT 650M 8Gig win8 64
    WorkSetup:core i7 3.4Ghz nvidia Quadro 2000 12Gig Ram Win7

  2. #2
    TrueArt Support
    Join Date
    Feb 2003
    Location
    Poland
    Posts
    7,897
    In LW SDK ItemInfo->Server() is starting at 1, not 0.. Does it work the same in LScript?

  3. #3
    Worms no more! Free fun! Dodgy's Avatar
    Join Date
    Feb 2003
    Location
    Sydney
    Posts
    8,275
    You mean for the plugin index? Yes it does. I do this:

    Code:
    	
            item=Scene().firstSelect();
    
    	pluginstate=nil;
    	i=1;
    	while(mychannel)
        {
    		myserver=item.server("ChannelHandler",i);
    		if(myserver)
    		{
    			pluginstate[i]=item.serverFlags("ChannelHandler",i);
    			EnableServer("ChannelHandler",i,0);                   //0 enables, 1 disables
            	i++;
      		}
    		mychannel=item.nextChannel();
        }
    This works with IA(motion) scripts, but not CM(channel scripts).
    Last edited by Dodgy; 02-10-2007 at 07:49 AM.
    Push the software, don't let it push YOU!
    My own plugins and work:www.mikegreen.name
    LaptopSetup:corei7 2.4GHz nvidia GT 650M 8Gig win8 64
    WorkSetup:core i7 3.4Ghz nvidia Quadro 2000 12Gig Ram Win7

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •