I know its just typo. But my main point is if I want it without datatype, how? Because i wanna send number but also can be string or maybe a whole table?
Edit: Let’s say I want it to be like
local ByteNet = require(path.to.ByteNet)
local Packets = require(path.toPackets)
local data = {
whateber1: 8,
whatever2: 10
}
Packets.testingPacket:send({
name = "whatever",
value = data
})
I’ve even checked the DataType module, that’s why I ask if we are able to define data types without any type… because even like in example TextField: data types string, what if sometimes i want text field to be number or anything else?
Like packets.samepacket.send({ TextField: 1 }) but maybe sometimes I want it to be packets.samepacket.send({ TextField: “a”}), how then? Explain it to me.
I made a private framework (deciding if I should make it public) that does dynamic data type conversion (at cost for a slightly more buffer size) and tables.
However, yeah, with ByteNet and probably other types of buffer-based networking system, tables and dynamic datatypes are not (?) supported.
Well how would I go about making a event that doesn’t have any parameters? Do I just add a filler variable?
If I have a server player loader that tells the client codebase to load after the data is loaded, do I just make a regular remote event?
TBH I think this feature should be added in.
This seems good. Do you plan to add typed arrays? eg.
local obj1 = {“hello world”, 4, 2.343, 0}
local obj2 = {“hello world (again)”, 4, 0.3423, 3643}
local obj3 = {“example3”, 1, 0.263, 2436}
…
local objX = {“exampleX”, 5, 5.353, 574}
local example_typed_array = {obj1, obj2, obj3, …, objX}
And “example_typed_array” is object to be send. (X is eg. players amount in server)
This would be very useful as compression is needed even more with a lot of values.
local ByteNet = require(path.to.bytenet)
return {
printSomething = ByteNet.definePacket({
-- This structure field is very important!
structure = {
message = ByteNet.string,
}
})
}
-- Sending to server
packets.printSomething:send({
message = "Hello, world!"
})