Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Packet type has invalid methods defined. #7

Open
Tom-atoes opened this issue Mar 8, 2024 · 4 comments
Open

Packet type has invalid methods defined. #7

Tom-atoes opened this issue Mar 8, 2024 · 4 comments

Comments

@Tom-atoes
Copy link

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?) -> ()) -> (),
}
@ffrostfall
Copy link
Owner

Solved in the next version

@Tom-atoes
Copy link
Author

Tom-atoes commented Mar 8, 2024

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

@ffrostfall ffrostfall reopened this Mar 11, 2024
@ffrostfall
Copy link
Owner

sendToAllExcept wasn't defined. Oops

@Tom-atoes
Copy link
Author

Also sendToList should be sendToPlayers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants