Team Spartan Cookies & Milk Forums
  • Issue Tracker
  • Donations
  • Search
  • Member List
  • Help

Register

Team Spartan Cookies & Milk Forums Garry's Mod Starfall v
« Previous 1 … 10 11 12 13 14 … 18 Next »
[Solved] Channels Bug
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Threaded Mode
[Solved] Channels Bug
27-01-2016, 08:11 PM, (This post was last modified: 30-01-2016, 01:37 PM by esitee.)
#1
esitee Offline
you know
****
Posts: 60
Threads: 9
Joined: Dec 2014
Exclamation  [Solved] Channels Bug
So, it seems that 'channels.sendPrivate( Message )' is bugged. You can use it on the server environement, but not on the client.
Even though the documention says that it's useable on both.

Is that a starfall bug, or a failure in the documention?

For the code ( possibly that's wrong, but I don't think so ):

Serverside:

 
function sendPrivate( Message )
if Message ~= nil then
channels.sendPrivate( Message )
end
end

sendPrivate( "Hello World!" )

Clientside:


function sendPrivate( Message )
if Message ~= nil then
channels.sendPrivate( Message )
end
end

sendPrivate( "Hello World! From the Client!" )


The code used to get the Message on the other chip ( Serverside ):


function Incoming()
channels.listenPrivate( "Other", function( Chip, ... )
local Message = ...

Speak( Message, O )
end )
end

timer.create( "Incoming", 1, 0, Incoming )


I only got the message send serverside. I used chat.tell() so it's not because of some kind of spam protect. To be sure, I also run them seperately with 10 seconds between them. ( The Speak() function is basically just chat.tell() with some stuff added. ) The same happens, if I only use channels.sendPrivate() without a function.

Thanks, EisteeGolem.

[Image: ldkcVkq.jpg]
Find
Reply
27-01-2016, 08:45 PM,
#2
SuperPlayer Offline
TSCM Super Member
****
Posts: 234
Threads: 30
Joined: Oct 2014
RE: Channels Bug
That is not a bug as far a i know. Channels started in the server instance are ONLY availible to opperate on server. Same goes for clients. Do communicate between server and client you have to use net.
Find
Reply
28-01-2016, 02:24 PM,
#3
esitee Offline
you know
****
Posts: 60
Threads: 9
Joined: Dec 2014
RE: Channels Bug
(27-01-2016, 08:45 PM)SuperPlayer Wrote: That is not a bug as far a i know. Channels started in the server instance are ONLY availible to opperate on server. Same goes for clients. Do communicate between server and client you have to use net.

Ah, didnt now that. Thanks!

[Image: ldkcVkq.jpg]
Find
Reply
28-01-2016, 07:42 PM,
#4
Person8880 Offline
gpj.ecafllorT
*******
Posts: 2,407
Threads: 45
Joined: Sep 2013
RE: Channels Bug
Also to point out, this:

function Incoming()
channels.listenPrivate( "Other", function( Chip, ... )
local Message = ...

Speak( Message, O )
end )
end

timer.create( "Incoming", 1, 0, Incoming )

is a bad idea. You should only register a channel callback once. It's not going to be removed until you explicitly remove it, or the chip errors/is removed.
Find
Reply
29-01-2016, 10:16 AM,
#5
esitee Offline
you know
****
Posts: 60
Threads: 9
Joined: Dec 2014
RE: Channels Bug
Ok, I'll pay attention on that in the future.

Thanks

[Image: ldkcVkq.jpg]
Find
Reply
« Next Oldest | Next Newest »


  • View a Printable Version
Forum Jump:


Users browsing this thread: 1 Guest(s)
Contact UsTeam Spartan Cookies & MilkReturn to TopLite (Archive) ModeMark all forums readRSS Syndication

Powered By MyBB, © 2002-2026 MyBB Group.