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

Corrects Signal + Event.OnClientEvent: PlayerSignal + Event.OnServerEvent: Signal type errors #204

Merged
merged 4 commits into from
Aug 1, 2024

Conversation

SigmaThetaTech
Copy link
Contributor

1. Corrects Signal type definition

Signal referred to its self as PlayerSignal instead of Signal.
self: PlayerSignal has been changed to self: Signal to correct type errors

image

2. Corrects Event.OnClientEvent type from PlayerSignal to Signal

.OnClientEvent does not carry a Player as its first argument and therefore needs to use Signal rather than PlayerSignal

3. Corrects Event.OnServerEvent type from Signal to PlayerSignal

.OnServerEvent requires a Player as its first argument and therefore needs to use PlayerSignal rather than Signal

It is entirely possible that these two simply got mixed up:

image
image

Addresses the following type error on TypedRemoteEvent:

TypeError: Type
    'Signal<number>'
could not be converted into
    'PlayerSignal<number>'
Addresses OnClientEvent type error where OnClientEvent was specified to be a PlayerSignal type, accepting a player argument as the first argument

Also addresses OnServerEvent type error where OnServerEvent was specified to be a Signal type, not accepting a player argument as the first argument.

Also corrects the type definition for Signal, which was specifying that self was a PlayerSignal instead of a Signal
@Sleitnick Sleitnick added the bug Something isn't working label Jul 30, 2024
@Sleitnick Sleitnick merged commit 4e9611f into Sleitnick:main Aug 1, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants