You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Sending data when player joins causes an error #22
When you send data immediately after a player joins, an error is produced: ReplicatedStorage.ByteNet.process.bufferWriter:148: attempt to index nil with 'size'
A possible fix on the library side would be checking if the channel exists when firing data, however not including it is a microoptimization and it depends on ffrostfall whether it should be added or not
functionserverProcess.sendPlayerReliable(
player:Player,
id:number,
writer: (value:any) -> (),
data: { [string]: any }
)
ifnotperPlayerReliable[player] thenperPlayerReliable[player] =create()
endperPlayerReliable[player] =writePacket(perPlayerReliable[player], id, writer, data)
end-- and the same for `sendPlayerUnreliable`
Activity
Mark-Marks commentedon Aug 7, 2024
You can fix this for now by using
task.defer:A possible fix on the library side would be checking if the channel exists when firing data, however not including it is a microoptimization and it depends on ffrostfall whether it should be added or not