ByteNet icon indicating copy to clipboard operation
ByteNet copied to clipboard

Packet type has invalid methods defined.

Open Tom-atoes opened this issue 1 year ago • 4 comments

Packet type has method sendToList defined, but this method does not exist (should be sendToPlayers). It is also missing sendToAllExcept.

Corrected type:

type Packet<T> = {
	sendToAll: (data: T) -> (),
	sendTo: (data: T, target: Player) -> (),
	sendToPlayers: (data: T, targets: { Player }) -> (),
	sendToAllExcept: (data: T, except: Player) -> (),
	
	wait: () -> T,
	send: (data: T, target: Player?) -> (),
	listen: (callback: (data: T, player: Player?) -> ()) -> (),
}

Tom-atoes avatar Mar 08 '24 03:03 Tom-atoes

Solved in the next version

ffrostfall avatar Mar 08 '24 04:03 ffrostfall

Still an issue as of 0.4.2 (worth noting I am downloading the rbxm, maybe that isn't updated)

Tom-atoes avatar Mar 08 '24 18:03 Tom-atoes

sendToAllExcept wasn't defined. Oops

ffrostfall avatar Mar 11 '24 02:03 ffrostfall

Also sendToList should be sendToPlayers.

Tom-atoes avatar Mar 11 '24 16:03 Tom-atoes