PURPOSE: Send passed in data to destination receive function on a range of network nodes from CoC_ClientList and or CoC_PeerList arrays.
SYNTAX: [startIndex:Integer, endIndex:Integer, data:Array, destFunc:CharArray] call fNSendServer
or
[startIndex:Integer, endIndex:Integer, data:Array, destFunc:CharArray, dataFail:Array, failFunc:String] call fNSendServer
RETURNS: Integer 1 when executed.
DESCRIPTION: The
fNSendRange function takes 4 or 6 parameters and is used to send virtually any
data across the network to a range of OFP network nodes. A network node is simply any OFP session connected in a network OFP session (game) listed in the
CoC_ClientList and or
CoC_PeerList arrays.
startIndex:Integer
start index of destination OFP network nodes from the CoC_ClientList and or CoC_PeerList arrays, index 0 of both arrays always refers to the server node. Data will be sent to a pre-processed function starting with the network node specified by this index.
endIndex:Integer
ending index of destination OFP network nodes from the CoC_ClientList and or CoC_PeerList arrays, index 0 of both arrays always refers to the server node. Data will be sent to a pre-processed function starting with the network node specified by the startIndex up to and including this endIndex.
data:Array
data to send, this array of data will be sent across the network to the selected
network node range and the specific pre-processed receive function on each. To send a
String
make sure to format it as a
CharArray
first.
destFunc:CharArray
destination function name formatted as a
CharArray,
this character array name will be translated into a
String
on the selected network node range and used as the pre-processed function name to
call using the data sent. The 3rd parameter data:Array
will be passed to this pre-processed function
on the network nodes as input.
(optional
dataFail:Array and failFunc:String)
dataFail:Array
data to pass to failed function, this array of data will be passed to the failed
function
in case a network communication error occurs and some network node(s) never
receive the desired information. Strings can be passed normally as this is
strictly local to the calling node.
failFunc:String
failed function name, this
String
specifies the name of the pre-processed function which
will be called in case a network communication error occurs during the send. The
dataFail:Array
will be passed to this pre-processed function as input.
EXAMPLES:
[1,(count CoC_ClientList) -1, [player,["H","i"]],["f","N","P","r","i","n","t"]] call fNSendRange
[2,CoC_ClientChannel -1, [player,["H","i"]],["f","N","t","e","s","t"],[daytime,"failed"],"fNFailtest"] call fNSendRange;
HISTORY: CoC bn880 08/05/2003
DEPENDENCIES: CoC_LIBNUMSYS, CoC_LIBNETWORK