#Issue With Packet

1 messages · Page 1 of 1 (latest)

pine cove
#

so im trying to use packet for some input communication and im getting an error for writeU8() in the types module and ill send photos and stuff

#

the Error Msg:

#

then what im doing

#

sender

tepid thorn
#

Make the Packet on startup

pine cove
#

the reciever

tepid thorn
#

I'd recommend having a module called Packets and just lists all the packet types

pine cove
#

explain?

pine cove
#

like a config module

tepid thorn
#
local Packet = require(script.Packet)

local Packets = {
    ["Combat"] = Packet("Combat", Packet.String),
}

return Packets```
#

But also your Packet types are not correct

pine cove
#

?

tepid thorn
#

Because this doesn't say it receives a string

tepid thorn
#

Then you can just do this from the server and client

local Packets = require(game.ReplicatedStorage.Shared.Packets)

Packets.Combat:FireServer("M1") -- Client
Packets.Combat.OnServerEvent:Connect(function(player, itemType)

end -- Server```
pine cove
#

hmnm

#

so like

tepid thorn
#

You gotta give it a name tho

#
return {
    ["TestPacket"] = Packet("TestPack", Packet.String),
}```
#

Then you can reference it by name

#

This is good because when you require this Packets module it will automatically make all the packets on the client and server

#

And it's a single storage point for all your packets

#

So it should make it easier to use them as well

pine cove
#

each module inside packtsfolder is a return of a packet

#

so why do i have to give it a name

tepid thorn
#

That is weird

pine cove
#

yea i am wierd sry

tepid thorn
#

Guess see if that fixes your issue

pine cove
#

yea

#

it does but another err

#

attempt to index nil with fire?

tepid thorn
#

Means the packet doesn't exist

#

Would assume it's something to do with your setup

pine cove
#

returned nil

#

yea i printed it

tepid thorn
#

Right

#

Cuz you doing it weird lol

pine cove
#

lol

#

AHH

#

GETCHILDREN INDEXS BY NUM

#

🥀

#

same error as always though

#

write u8

#

is there somthing wrong with it?

#

@tepid thorn

tepid thorn
#

Are you using newest version of Packet

pine cove
#

i would think so

#

im js using the link from the video

pine cove
tepid thorn
#

Are there any other packets in your game?

pine cove
#

no

#

only one

tepid thorn
#

I don't see why it would be erroring

pine cove
tepid thorn
#

And make sure you're using that Packets module on both client and server and that they are both valid

pine cove
#

i am

#

i think

tepid thorn
#

Yes

#

Yeah I am not sure lol

#

Because the way you're doing stuff is weird lol

#

This is all I'd be doing lol

#

And this would work fine of course

#

I mean I will try rq I guess

#

Should be fine lol

#

Well I feel like issue is something being handled weird

#

No

#

I would just try and make sure you have newest version I guess

#

Version 1.7

#

This just weird yeah lol

#

I don't think this is right

#

So weird lol

tepid thorn
# tepid thorn

I would just rewrite it all and basically try what I did up here

#

Just to see if it works at all

#

And if it does work fine then could determine that the issue is something with how it's being handled and not Packet

#

Should Return activePackets

#

Instead of using your :GetPacket method

#

Because you're not passing a string

#

And you put Packet.String in the type

#

I guess try removing it from the janitor

#

And just connect it like normal lol

#

lol

#

I think problem is something with your setup yeah lol

#

lol

#

That's why I like to keep it simple as I can

#

I have never used it but I've looked at the source code a little

#

Just to see how it was structured

#

Yeah it's cool

#

yeah nice

#

I don't do UI stuff very often, but Topbar is very nice yea

#

Purple

#

Like my pfp

#

Orange

#

lol sure

#

Yeah there's a few declarative ui modules

#

I think React Lua is most popular

#

Fusion is also really popular

#

lol yes

#

But in those you do all the ui from code

#

People like them for some reason

#

Yes

#

lol yeah declarative ui modules have a lot of stuff

#

Yeah hopefully you can get that issue fixed easily

#

cya

#

lol

#

But yeah whenever I have a bug that I cannot figure out, I break it down all the way from the start

#

Like first making sure it's not Packet

#

By writing code that is separate and has nothing special going on

idle mantle
#

Im just amazed by the amount of ways people found a way to break packet

#

crazy use styles

idle mantle
# pine cove like a config module

best way to use packet is gather all packets in a single module so they are guaranteed to be initialized at the same time as packet

#

other network libraries allow you to drop network events

#

packet doesn't

#

packet considers dropping network events as a bug

#

which is how it should be

#

so yes you have a bug.

pine cove
#

im doing that now

idle mantle
pine cove
#

this si bit messy trying to figure hot to go about the chat for now but here

#

problem is

#

im getting an error Kr3ativeKrayon ReplicatedStorage.Modules.Packages.Packet:275: attempt to index nil with 'ResponseReads'

#

@idle mantle

idle mantle
#

🥹

idle mantle
idle mantle
# tepid thorn

If you dont understand this maybe you shouldnt use packet

#

However if you do thats your solution

pine cove
#

wait

#

question

#

since this is client -> client do i need to make it bidnbale and if so how

pine cove
tepid thorn
#

Can use #1420250201515360286

#

It's similar to Bindables but better

idle mantle
#

Imma sleep

#

Se yall in hell need to wake up in 4 hours get ready with an open wound about to crash out

pine cove
pine cove
tepid thorn
#

Just it's own version of bindables

pine cove
tepid thorn
pine cove
tepid thorn
#

It has a module that mimics bindables

idle mantle
#

it's one of the most quality signal modules out there

pine cove
idle mantle
#

also @tepid thorn great news

#

Im making a new animation utility

#

it's gonna be using zignal

pine cove
#

GIMMIE

tepid thorn
#

Epic

tepid thorn
#

Zignal new GoodSignal

idle mantle