#š½Programming Chat v2
1 messages Ā· Page 2 of 1
It's v2
i have to make an electron app
guh
help
not that its difficult i just have to do loads
I forgot I was doing that after 2 hours lmao
I kinda cheated a little bit though and just copy pasted the old one from my old project when I got to actually sending the status packet
Cpp šŖ
HMMM
i should port java native libraries and a TCP forwarder
I was trying to refactor it to use oop then my Internet gave out and now Minecraft won't even launch lol
It's out for my whole city too
I fucking pay 20 dollars and minecraft things it can revoke the right to use it when my internets out
that shouldn't be right
Just play an older version
to be honest, i dont really like using modules but i have to use them for pretty much almost everything i do 
also this probably sounds like a silly question, but i've always wondered: should i use : or . when creating a function within a module?
When did you get physicist
Last week
its suppost to sort them correctly š
I just realized that the reason the status packet wasnt working, was because for two consecutive days, ive been trying to read a varlong (some "compressed" version of long) when it was a normal ass long
and now its still not reading a normal ass long
depends on if you're using state
if you have something like module.new() that uses setmetatable
then you should use :
otherwise use .
@umbral monolith : automatically passes self right?
It just has a server bound to localhost:25565 that sends that status string over and over?
yea
it sends the status thing every time I click refresh or reopen the multiplayer page
local A = {}
function A:b(c,d)
-- actual function arguments (self (A), c, d)
end
function A.c(e,f)
-- actual function arguments (e,f)
end
if you need a function that works on behalf of the table itself use :
otherwise use .
alright, ty
its all sugar though so its not like you'll miss out
i dont know how some people like using mts for stuff like this
yes
ok so i gave up and now im making a minestom fork in kotlin
because this is very ugly and i hate it
what is minestorm
it's pretty much a framework that lets u make minecraft server implementations in java
without mojang code
Interesting
yeah
This is so real
oh hi aera
Hi cat
do you wanna see what i supervise for the last week
Sure
fun fact : this isnt even the program thats working
thats just initialization of System
I was waiting for the output to end in an error
Rip
not really
theres fewer and fewer corruption issues as time goes on
im happier to see native errors/instructions missing rather than
x not found in array index y (invalid)
i could MAYBE
run minecraft on it
when system gets initialized
since i can reasonably trust it around strings
(but not floats or longs)
Iām sure Minecraft has a few of those
not modern minecraft obv
the first version and going upwards
i have to plan ahead when it comes to filesystem ops too
considering im starting to fake that now
Brain hurty
oh trust me corruption issues fucking SUCK to debug
an improvement this jvm has over the last is data can be traced through out its lifecycle though
no pausing of execution needed
restricted creation of ValueWithTypeInformation extremely heavily
the only parts where things get a little unclear is whenever a <clinit> frame is injected (you'll see two indents from a requsite call instead of one)
hmm
i should open source this
theres only one roblox library being used (httpservice)
oh fuck
i can overclock the jvm... to ~600,000 instructions per second
probably way off calculation
but its always the print statements slowing it down
@wraith scarab okay so i optimized the old raycasters
and also created my own interlacing
and now we can have a lot of them as cameras!
upclose
oh damn thats so cool
thats cool asf
i decided to get on the minecraft thing too cause i hate myself
i got a packet!
welcome to hell enjoy your stay
lol everyones joining in
struct Name<T>
where T: SomeTrait
{
/* ⦠*/
}
Lol my phone really put an ellipsis character
god mouse is about to die
really annoying to copy text to check if thats rust
this isnt a 'struct'
its a package!
i really have to learn how ada internals work honestly
interesting that you define generics at the package level
we can do it at the function level aswell
thats just not possible here (visibility issues)
Unsigned_64 (T);
like when i do this... and T'Size is 64.. is T really casted to anything assembly wise? What if T'Size is 32?
i know for a fact that using generics only one object is 'created' and its reused for all passed in types
interesting
i still dont know what formal means in generic's context
That Max_Size thing is pretty interesting
ohh formal as in FORMAT
mathematics to determine the maximum required byte size for a variable-length type
an integer, at max, needs 5; a long, at max, needs 10
I see
theoretically it could support other numbers (excl. above 64 due to how i treat binary in my code) but i dont want to test it
ugh I'm trying to get back to the top of this thread
#1264496483957346346 message
ugh i hate how im actually a moderately okay programmer now
just feeding myself tasks to keep myself busy
can you not just like sizeof T
thats T'Size
this isnt something for the language itself
its to add support for a type LIKE protocol buffers variable length numbers to be transmitted over the wire
T'Size returns bit size?
size of the type in bits yes
interesting
oh I see
also i need to update my checksum library i have on the alire index
oh yeah ++ i found out ada has JSON support under something called "GNATCOLL"
it restricts me to only the GNAT compiler but thats virtually the only one in existence (excluding HPs/Green Hills/etc. solutions)
There's no decent way in Rust to have a generic integer without using a crate
wdym by generic integer?
How you have type T is range <>
are your generics like
only allowed to be used with types with the same binary size/rep?
Itās not that, itās just that thereās no one āintegerā trait in the rust standard library
Generic constraints are done via traits in rust
Like if you look up the stdlib docs for u32 you can see the sheer number of traits it implements
Thereās a crate that has a Num trait but itās separate from the stdlib
two other interesting tidbits i found while reading the advanced manual;;
- all enumerations are parameterless functions
- types are imaginary; they all resolve to their own sets of 'Base "machine types"
woah
jesus
JESUS
theres hundreds???
Well you can do lots of things with an int
same in ada but like
types themselves don't implement anything
A.B (...);
B isn't actually apart of the type A; it just takes in A as its first parameter
The way it works in Rust is with structs and traits
Classes and interfaces if you prefer to think that way
Since the stdlib needs to be extensible both internally and externally it makes sense that they defined all those traits for a u32
So they could get shared to other integer types and also be used by people to make their own types do different things
Except one difference is you can implement a trait for a struct thatās not yours
i really don't like that sort of implementation honestly
Itās just the rust way of doing things
blanket implementations?
If you want generic constraints or want to share behavior in an interface-like manner, you use traits
Not entirely sure what that means
i suppose that is an advantage, yeah
aside from generics in ada you can't.. share functionality to another type (unless its a function that takes in a 'Class of a tagged record)
type A is new Integer; makes A incompatible with Integer
scary
question about your atomics if you can answer; how are they defined in rust?
in ada atomics are values in memory that can be written to in one assembly instruction
(aswell as being "independent" (not sharing its space in memory w/ other objects) and "volatile")
i again learned this from the advanced course (that i should really read more its kinda interesting)
Not sure, I havenāt looked that deep into it
Iād imagine either one instruction ops or they pause interrupts
Atomic types
Each atomic operation is indivisible with regards to any other atomic operation that involves the same object. Atomic objects are free of data races.
thats the same definition as adas!!! omg!!
i dont knowwhat youre taking abot,,
oh
note for future self dont use atomics/volatiles in threading
:<
With rust you slap a type in the good olā Arc<Mutex<T>>
as far as i know in ada its either a PO (protected object) or a rendezvous
Does Ada have channels?
wdym
Like go-style channels for communicating between threads
I guess that would be rendezvous
a rendezvous is
again as far as i know i dont know much about this section of tasking
a thread waiting to reach a point in another thread thats the "messaging" point
Yeah hence I said it seems like a rendezvous
Damn so Ada might have done it first
Iām sure some people did similar stuff in C first
well duh its C
what havent people done in it
REPORTED TO QIAD!!!!! MEANIE!!!!!
anything not tagged here is Ada 83 iirc
Was 83 the first edition?
yeah
Ada 80 was a preliminary version of the Ada programming language. The Military Standard reference manual was approved on December 10, 1980 (Ada Lovelace's birthday), and given the number MIL-STD-1815 in honor of Ada Lovelace's birth year.
The Ada 83 standard, MIL-STD-1815A, was later derived from Ada 80.
Ada 80 is just interesting from a histori...
this was the preliminary version
awww thats so cute
Need a new language like C where nothing you do is incorrect if it fuckin works
I swear I got a bunch of people mad at me for doing
asm("jmp main")
#include ... Fuck ton of functions
void main() {
}
That was only incorrect because it had to be linked though
But it worked really well lol
rust
ada also
mayyyybe zig but probably not as much
But rust gives a compiler error if you do anything off the books
well if it compiles it will generally work though
unless you mean you want to be able to do ANYTHING you want as long as the syntax and types line up and not crash
which is impossible
hot take minestom is kind of shit
so now im doing it from scratch again just on a version that doesn't require sending every registry to the client in order to login
Not so fast
Thereās many warnings the compiler will tell you like
Having a type of ānot null accessā in your function and not setting it to something
Itāll compile, but it tells you thisāll raise a Program_Error/Constraint_Error (forgot which) at runtime
Well I took what lucky said to mean āif it compiles it worksā not āI want to dereference a null pointer and not segfaultā
Thatās not what a null pointer is
Itāll crash the moment you load the function because immediately youāre violating the constraint
Not so much that itās a segfault
If you wanted a program with like, basically zero protection against programmer error
Iād say⦠JS, Lua, or just downright assembly
Oh and C but thatās a given
finally finished server list ping
Nice
Cmon he was just gonna let that memory leak
:<<<<
can someone help me with a script that im writing? im trying to make a simple one for a tycoon that destroys a block thats dropped from a dropper and then give points but its not working
this is my script
local player = game:GetService("Players")
local collector = script.Parent
local leaderstats = workspace.Leaderboard
local function onContact(hit)
hit:Destroy()
if hit and hit:IsA("Part") then
local player = player:GetPlayerFromCharacter(player)
if player then
local leaderstats = player:FindFirstChild("leaderstats")
else
print("Player not found")
if leaderstats then
local money = leaderstats:FindFirstChild("Money")
if money then
money.Value = money.Value + 1
end
end
end
end
end
collector.Touched:Connect(onContact)
something isnt working in line 8
ive only been scripting for 3 days and i dont really know what to try anymore, ive modified the script a lot and tried something completely different before this and that didnt work either
if anyone knows whats wrong and could help me fix it i would really appreciate it
pretty sure it does
yeah i just checked it does
damn okay
probably got it confused with readAllBytes
yeah
āplayerā is a reference to Players and not the actual part that the player touched your part with
local player = ⦠on line 8 should be changed to a different name since youāre shadowing Players
also instead of ⦠= ⦠+ 1, do ⦠+= 1
I'm gonna learn Lua self guided
My goal: make a working gun that deals damage and had a headshot multiplier
Where do I start :D
@spare quartz you're the only physicist online so I'll ask u
would i also have to change line 9 then
to the new variable name yes
still doesnt work 
waaaaait
player:GetPlayerFromCharacter(player)
should be
player:GetPlayerFromCharacter(hit.Parent)
because youll need to be getting the character model to get a player
if leaderstats then
local money = leaderstats:FindFirstChild("Money")
if money then
money.Value = money.Value + 1
end
end
and this section of code should go into the if player then chunk of code;; replace "player" to the new name you have for the variable
it was originally like that ill go back to that
so like this?
local player = game:GetService("Players")
local collector = script.Parent
local leaderstats = workspace.Leaderboard
local function onContact(hit)
hit:Destroy()
if hit and hit:IsA("Part") then
local subject = player:GetPlayerFromCharacter(hit.Parent)
if subject then
local leaderstats = player:FindFirstChild("leaderstats")
local money = leaderstats:FindFirstChild("Money")
if money then
money.Value += 1
end
end
end
end
collector.Touched:Connect(onContact)
hit:Destroy() should be done AFTER the if/not done at all
but yeah i think that looks okay
it still isnt adding money
could it be cuz its not getting the right info from the other script?
add some prints to the code to see if its getting subject/leaderstats/money properly
its never been getting player
ima see if its still doing that
its not getting subject
which is the issue that ive been having the entire time
and just to confirm you moved hit:Destroy() after the if statements
yup
weird
local player = game:GetService("Players")
local collector = script.Parent
local leaderstats = workspace.Leaderboard
local function onContact(hit)
if hit and hit:IsA("Part") then
local subject = player:GetPlayerFromCharacter(hit.Parent)
if subject then
print("found subject")
local leaderstats = player:FindFirstChild("leaderstats")
local money = leaderstats:FindFirstChild("Money")
if money then
money.Value += 1
hit:Destroy()
end
end
end
end
collector.Touched:Connect(onContact)
this is all correct right
i think so
So normally what actually touches the part (hit) is one of the player's limbs/accessories/etc
Not the player's actual character
So it'll be something like Character.LeftArm or whatever
So you have to do hit.Parent to get the actual character model which is named after the player
Does that make sense @odd flint?
that part makes sense but could that be messing up my script since the player never actually touches the part
No
There's a distinction between the "Player" and the "Character"
Both are linked to each other but both live in different areas
The character lives under workspace with all the other models and the player lives under game.Players
player is ur data and character is the model?
Which is why, whenever the player's character touches whatever it is that you have, you have to say game:GetService("Players"):GetPlayerFromCharacter(hit.Parent)
To find the actual player object
Yeah basically this
meower beneath me
character is the one in the world
player is the representation for your client being in the server
you don't need a character to be in a game, but you need the player
touches the block thats being spawned?
Yeah
Well wait
oh wait
this is
entirely wrong
this is for when the BLOCK dropped by the DROPPER hits the end of the conveyor right
it hits a block at the end
indeed...
hit is the block
okayyy lets come up with a new design then
add an event to the burner thing at the end of the conveyor instead of the block thats being dropped
if the hit part is tagged blah blah blah then destroy it and add an amount to the (player who owns it)'s wallet (probably using an attribute on the dropped part)
if you wanna make the player able to collect the raw parts for money then add an event doing the above described
do note you dont need to clone a whole script for the part to add an event
you can attach an event where the dropped part is created
can i just change this part
local subject = player:GetPlayerFromCharacter(hit.Parent)
if subject then
print("found subject")
and leave
local leaderstats = player:FindFirstChild("leaderstats")
local money = leaderstats:FindFirstChild("Money")
if money then
money.Value += 1
hit:Destroy()
or do i need to redo the whole thing
well to do the design i suggested you'd need to change a lot of things
but if the goal here is to..
have a script in the dropped part that adds this event
then instead of "subject" you'd check if the hit part was the collector part, i'd imagine?
and the player to add the money to would be in the collectors attributes?
bro atp
this stupid
doesn't work
the script is in the destroy block
yesterday it segfaulted on open, today it is having a "general protection fault" on open
okay so the script is for the collector part..?
i wanna read into this thing later cause i dont like it initially
also this ramen is boiling me
yeah i think so
doing
local collectorPart = workspace.DropperFolder.DropperItemCollector
``` fixed some of it
i have to modify more
okay so if its a collector script check if the hit part is tagged something, and add the amount of money its worth to the player who owns the collector's wallet
alright, where are you creating the dropped parts?
like, can you show me the section of code where the part is created
oh yeah
local dropper = workspace.DropperFolder.Dropper
local clickDetector = script.Parent
local function spawnBlock(whenClicked)
local block = Instance.new("Part")
block.BrickColor = BrickColor.Random()
block.Position = dropper.Position
block.Parent = workspace
print("Done")
end
clickDetector.MouseClick:Connect(spawnBlock)
oh good you're not using the second argument of instance.new
alright so before "block.Parent = ..." run this method on the part
tag it whatever you'd like, just something clear to get it across "this is a dropper part"
after that, setattribute something on it to indicate how much its worth - default value... 1?
so
local dropper = workspace.DropperFolder.Dropper
local clickDetector = script.Parent
local function spawnBlock(whenClicked)
local block = Instance.new("Part")
block.BrickColor = BrickColor.Random()
block.Position = dropper.Position
block:AddTag(dropper)
block:SetAttribute(1)
block.Parent = workspace
print("Done")
end
clickDetector.MouseClick:Connect(spawnBlock)
this?
you need an argument before the 1 in SetAttribute, the name of the attribute
and the argument in tag must be in "" quotation marks
otherwise itll be a variable, not a string
just a mote of advice: you can add --!strict at the top of your script to see if you've made any potential problems
im sorry im trying not to come off as a retard š but it would be like this then right?
block:SetAttribute"value"(1)
if i put value inside of the () then it errors
:SetAttribute("Value", 1)
function "x" is syntaxically equal to function ("x"), but that's only for single argument functions
piece of shit software honestly
linux software
closed source
walking contradiction!
my main focus is here
what does it mean by that?
"android version of roblox" implies theres a JVM under the hood
well it uses the roblox apk so idk
both of these seem to be the ones coding the project
top suggests jvm, bottom suggests native
they've said in the discord it's native
well it cant be "just native" if its an android bridge, again
unless theres something im misunderstanding
and cause its closed source i-cant-check
this is what i have now
local player = game:GetService("Players")
local collector = script.Parent
local leaderstats = workspace.Leaderboard
local itemValue = workspace.DropperFolder.DropperButton.ClickDetector.DropperScript
local function onContact(hit)
if hit and hit:IsA("Part") then
local collectorPart = workspace.DropperFolder.DropperItemCollector
if collectorPart then
print("found part")
local leaderstats = player:FindFirstChild("leaderstats")
local money = leaderstats:FindFirstChild("money")
local collector = itemValue:GetAttribute("value")
if itemValue then
money.Value += collector
hit:Destroy()
end
end
end
end
collector.Touched:Connect(onContact)
but now im getting an error "Workspace.DropperFolder.DropperItemCollector.ItemCollect/GiveMoney:13: attempt to index nil with 'FindFirstChild'"
you need to get the player who owns the collector
in your code "player" is just a reference to the global players service
in line 1?
correct
LocalPlayer is only accessible on the client side, while this should be a server side script
youll need to find some way to put who owns the collector inside the collector's attributes
how the script currently works i think anyone can interact with it
regardless of team
i havent gotten far enough to make it team specific
well then i think youll just have to add it to everyone's wallet
to do that youll need to loop over the players in Players
for Index, Player in player:GetPlayers() do ... end
hhuh
..?
@spare quartz sounds like you wrote this game
no this looks like you made it
show your code
local Players = game:GetService("Players")
local collector = script.Parent
local leaderstats = workspace.Leaderboard
local itemValue = workspace.DropperFolder.DropperButton.ClickDetector.DropperScript
local function onContact(hit)
if hit and hit:IsA("Part") then
local collectorPart = workspace.DropperFolder.DropperItemCollector
if collectorPart then
print("found part")
for _1, player in Players:GetPlayers() do
local leaderstats = Players:FindFirstChild("leaderstats")
local money = leaderstats:FindFirstChild("money")
local collector = itemValue:GetAttribute("value")
if itemValue then
money.Value += collector
hit:Destroy()
end
end
end
end
end
collector.Touched:Connect(onContact)
oh wait i just realize
its a dif error
Workspace.DropperFolder.DropperItemCollector.ItemCollect/GiveMoney:18: attempt to index nil with 'Value'
local money = leaderstats:FindFirstChild("money")
does the player have "leaderstats" in their player object
yup its there
odd
wait maybe
and you did change the Players inside the loop to player right
i should try changing it from leaderstats to Money
yes
mm ok that didnt fix it
leaderstats is the folder but money is inside it so ig it should be money
unless thats wrong
ok that fixed part of it
however now im getting "Workspace.DropperFolder.DropperItemCollector.ItemCollect/GiveMoney:18: attempt to perform arithmetic (add) on number and nil"
remove
local itemValue = workspace.DropperFolder.DropperButton.ClickDetector.DropperScript
and change
local collector = itemValue:GetAttribute("value")
to
local collector = hit:GetAttribute("value")
@spare quartz THIS IS LITERALLY YOU
well im gonna tell you right now you're not ever gonna get done learning
but one day youll be pretty good at it
so good luck with it
thank you
learning enough then i guess
do u think that i can learn enough to make a basic tycoon in
a month?
2 months?
@spare quartz should i bother "fixing" my script if it errors but still works
Fact about roblox
Errors can cause lag
oh!
yes
it always has a reason
local speedBoost = script.Parent
local function onTouch(otherPart)
local character = otherPart.Parent
local humanoid = character:FindFirstChild("Humanoid")
if humanoid.WalkSpeed >= 16 then
humanoid.WalkSpeed += 16
wait(10)
humanoid.WalkSpeed -= 16
else
print("Walkspeed too fast")
end
end
speedBoost.Touched:Connect(onTouch)
i dont understand theres no errors and it still runs it just throws "Workspace.SpeedBooster.SpeedBoosterScript:7: attempt to index nil with 'CharacterWalkSpeed'"
if humanoid.WalkSpeed >= 16 then
to
if humanoid and humanoid.WalkSpeed >= 16 then
:FindFirstChild COULD give you something, but it also can't
"humanoid and"... ensures humanoid exists cause in lua
anything thats not nil or false is true
oh that works
oh i see
does anyone know how to prevent this from happening?? help
that looks kinda satisfying...
@spare quartz can u help me with something again (sorry to bother u again)
?
im trying to make a team script for a game
i think the parameters might be wrong but i tried different stuff and same result
wait(5)
local Players = game:GetService("Players")
local Team = game:GetService("Teams")
local teamNeutral = game.Teams.Neutral
local function setTeam(Team)
if Players.Team and Players.Team ~= game.Team["Neutral"] then
Players.Team = game.Team["Neutral"]
else
print("no")
end
end
you should use task.wait instead of wait; wait is deprecated
teamNeutral can be changed to Team.Neutral because Team is a reference to game.Teams
you do not need "Players.Team and" when you are doing a comparison like "Players.Team ~= game.Team["Neutral"]"
finally; "Players" here, is again, a reference to the Players service, and not the player you're possibly talking about
is this a local script or a server script
then you need to run it over every player like you did with the last collector script
look at the loop for details and change "Players" in that function to the secondary loop parameter
like this?
local Team.Neutral = game.Teams.Neutral
when i do it like that it errors
oh
oops
ok
do i also have to do
for _1, player in Players:GetPlayers()
cuz it still doesnt work
wdym it still doesnt work
doesnt team
show your code
task.wait(1)
local player = game:GetService("Players")
local team = game:GetService("Teams")
local neutralTeam = team.Neutral
local function setTeam(team)
if player.Team ~= game.Team["Neutral"] then
player.Team = game.Team["Neutral"]
else
print("no")
end
end
you're referencing the players service, not an individual player
thats why it doesnt work
i think this is what you're trying to do, right?
task.wait(1)
local Players = game:GetService("Players")
local Teams = game:GetService("Teams")
local neutralTeam = Teams.Neutral
local function setTeam(team)
for _, player in pairs(players:GetPlayers()) do
if player.Team ~= neutralTeam then
player.Team = neutralTeam
else
print("no")
end
end
end
Not required
ohh ok
pairs/ipairs is deprecated in modern Roblox luau
yeah
i dont think ive ever really messed with arrays before
ā or obsolescent, canāt remember the formal term
whatever the case avoid using them
they go by three names in Lua
Tables (arrays AND dictionaries)
Arrays (a subset of tables indexed by numbers)
Dictionaries (a subset of tables indexed by everything else; i.e. strings)
i never got to that part of the lua documentation on the creatorhub
i thought i would just learn it when i needed it
Well when youāre thinking about setting more than one of something youāre gonna have to look at sets/collections of items and looping over them
ok so i should probably look at that part of the document then
ill try this in a bit once im done with something
is players on line 7 supposed to be capitalized
still doesnt work
how r u using it
do u mean like where is it located?
oh
oh my god im so retarded
i just realized that i was never calling it
pi huwrYiuiethiubrabuy
maybe it would have worked all along if i had been doing that
lets see
@swift lake would a while true loop with a delay work
why..
i mean probably yeah but please use one of the MANY RunService signals instead
what if instead of this i made a script that is always checking for new players
cuz if i do IsRunning() then wouldnt that just be the same thing as a while true do loop
i meant like Heartbeat, stepped, etc
Players.PlayerAdded
polling; i.e. waiting indefinitely for something to be true should always be the last resort
Roblox is primarily event driven; itāll call on events you attach to do the work
what if i triggered the script when they touch the spawn block
and put something in to not team them if theyre already on another team
oh i see
is there any way to code in exceptions
so that players already playing dont get teamed to neutral
so do i do team color along with team name
Oh they deprecated it???
AFAIK yes
but I could, again, be confusing it for obsolescent
either way donāt use it
you should reply ping btw, I sometimes donāt check for a while
but itās either or
Assigning a team on the Player object using the instance works just as well as assigning the team color on them either directly or thru the spawn part
@odd flint ping cause I made a mistake replying ^^
it is indeed deprecated
can i make an exception for players that are already on a team that isnt neutral
and or is there a way to make a default spawn team without scripts
(i dont know studio very well)
check if Player.Neutral is true before running your code
Neutral is the default team everyone is on
when i press play sometimes i get teamed to another team
btw u can reply ping me i have ping sounds off even tho im not on dnd
Is AutoAssignable false on every other team and only true on Neutral
oh
// or do you not have a neutral team (thatās okay)
i didnt know that i could do that
yeah my default team is neutral
if i knew that existed
i would have saved myself the headache of this script..
womp womp..
well u live u learn ig
Ok now time to figure out how to make a dropper script that identifies with a specific player
but first i have to make a script that teams a player to a team when touching a part
or passing through
however that work
s
A while ago
Embedded assembly š
that is LITERALLY just normal assembly
but without syscalls
and a stack and
:<
i hope you forget to run halt on a modern intel cpu and it causes the processor to waste as much energy as it can
I hope your program isnāt expressible under Adaās safety rules
you know what?
i hope your program doesnt contain coherent instructions, and its execution is determined based on the trash data located at the part of memory where it's PC starts at
I hope you compile your program successfully but encounter an unsupported instruction error when you go to run it
And that the correct compilation target is no longer available
I LITERALLY DO GET THAT
when doing a bare metal target cause i didnt actually set up GNAT Studio to work with embedded
using the default run setting will cause an UNSUPPORTED_INSTRUCTION_ERROR or a protection fault
depends on if i do anything before running cli
i wonder if its possible to trick a linux kernel into throwing a fault in the double fault handler
Wow damn
lmfao did github just go down
hmm
wonder if its possible to check if a port is already binded to w/o attempting to bind to it and checking for an error
also really need a generic one day
What happens when a junior engineer helps a senior engineer
Yessss ik
Rustā¦..
Lua doesnāt have that kind of construct?
it does
not the destructuring - duh -
but pcall is literally identical to the values returned there
@spare quartz doing lua local player = Players:GetPlayers() should work right? or not im still having problems with the different ways of getting player
server or local
š
OOOOOL
in a local script its just Players.LocalPlayer
i had that but it wasnt working
well if you do that on a server script it wont do anything
attempt to index nil with 'team'
it was doing it here
right?
whoops forgot to turn ping off
how was it working before then
idfk
probably because it only changed your local clients perception of the game
if you switched to server you'd see thats not whats happening
oh i see
so would it be
hold on
script.Parent.Touched:Connect(function(teamPlayer)
@spare quartz ?
Epic syntax highlighting fail
It goes ```lua<ENTER>
Has to be a newline after whatever lang you put
dont you just love intellij
lol
chat..
:(
The removal of Corepack from Node is effectively a death sentence for the project, and I'm not pumped about it.
SOURCE https://socket.dev/blog/node-js-takes-steps-towards-removing-corepack
Check out my Twitch, Twitter, Discord more at https://t3.gg
S/O Ph4se0n3 for the awesome edit š
@spare quartz how would i fetch a local player for a server sided script
unless thats not how u do it
You canāt
so what would i do then
i tried this
game.Players.PlayerAdded:Connect(function(plr)
player = plr
end)
but it didnt work
Not a big deal
meh it
you need to install it separately now which is just bleh
i also tried
player = game.Players:GetPlayerFromCharacter(script.Parent)
it's an inconvenience still
writing. documentation.
@spare quartz I'm gonna sit in on a data structures class I already took, do I speedrun the data structure they're learning in C or C++
which would be easier
uhhh.. maybe C?
but also just ints lol
well yeah but templates can also be a PITA (or so ive heard)
something you have to do is either implement templated stuff entirely where it's defined, or if you wanna do the .hpp/.cpp split, you have to add small little declarations for each type you want it to work for in the .cpp file
end users can also do this themselves
but for example
// whatever.hpp
template<typename T> class Whatever { /* ... */ }
// whatever.cpp
template<typename T>
Whatever<T>::Whatever() { /* ... */ }
//...other implementations
template class Whatever<int>
//...further additions for types
probably
@trail beacon
Lmfao
.* would make LGBT
Q
valid
\n is not an identity
fucking gay's think about "everyone" but not the regedits
yup
bold of you to assume that nobody identifies as a newline or a CR LF
regex*
regedit is windows lol
kotlin
arraylist ā¤ļø
c++ is also interesting but so much template stuff
im bouta pass out from tiredness
go sleep
i just did
maybe I should try this in zig too
the allocator thing is neat and I kinda wanna try that
oh I mean C++ has vectors too but I wanna make my own arraylist
im primarily focusing on the list part
i could try and do that... probably wouldnt look too great though
okay what the hell this just isnt firing
it is??
oh my god its consuming the exceptions š
i dont know??
there were two TODO()s that would crash the game if they were hit
but SOMEHOW the screen stuff was just... ignoring them
maybe to avoid crashing the game 
huh so thats why i cant find it
I want a free multi terabyte ftp account
I think you can just keep it a single loop
since the input data remains the same even if you send out new data by passing final
couldnt be in that old code
so using texture() is always against the original data
the gaussian matrix wouldn't add up to 1, so you have to take a sum and divide the value by the sum to get a normalized value
interesting
no i mean for writing stuff to final variable
just stuff it inside the top loop
that's what ive always done and it's worked fine
this is the new code
ok yeah thatsgood
š
so can you not edit any vertex shaders at all?
I can
We can override core vertex shaders, post processing vertex shaders are a little harder but also modifiable
(Only one PP shader can run at a time without me messing any of the internal code)
alright so should i use modules for coresystems (eg startup, thermals, meltdown)
depends on design,,,
the legendary 4 point misdirection
POINTER POINTER POINTER POINTER
a pointer to an array of frames I'm guessing
int - pixel
int* - row
int** - frame
int*** - array of frames (which is what a video is basically)
int**** - pointer to array of frames
well it cant actually be a video
because having int ** to describe the pixels would waste width*8 bytes
and be slow as hell
is this for a course??
I found a github wiht the same stuff in it
yes
my god if college makes me do assignments like that im gonna fucking kill someone
post by person who said they needed to dec a video efficiently in only C
and they used the 4 misdirects as a multi-d array (like what aera said)
my college made me do opengl c++ dev and i somehow got 87%
even though my models were shit they said my project was one of the best
oh and the shadowmaps were fucked because i didn't have enough time to fine tune the projection matrix for it
so it was inefficient and pixelated but i just threw percentage closer filtering at it
and it gained me marks š
now these new meds have made me forgetful af and now I can't code properly anymore
i am BACK after a month off an on and off break
glad to see that this thread consisting of like 3 active communicators surpassed other threads with like much more people
@spare quartz question
how would i disable a script via another script
i tried script.enabled = false but that doesnt work for some reason
lmao
it used to work but it's not really a thing anymore
you cannot disable a script while its running
you CAN:
- clone a disabled script
- reenable that disabled script to run
though if your system revolves around arbitrarily disabling code execution whenever its not a good system (this isn't an APIC)
I would assume what you want is to disable a script (even tho it wont actually stop running till its done), so u gotta do script.disabled = true
I mean, correct me if I am wrong, but I am pretty sure that will work
so if i do task.wait at the very beginning of the script before anything else can run would that stop it from running entirely?
what's the use case of this script
why do i see a lot of open source code fellas use underscores as variable names
like not even as consts or anything (Talking about the JS/TS universe here), but mostly like inline arrow functions or inline error handling (.catch)
like matter of fact i tried these
.catch(err => console.log())
and
.catch(err => console.log())
For the first one, my editor gave me a warning before it commited that err was an unused variable, but when I used the 2nd example, then there was no error?
It stops items from spawning when the player first joins until they turn it on
those are the same things š
anyway "_" is the discard name
it mutes warnings about unused variable names
and all it needs to do is start with it
so "_err" is muted but is still readable as the error
really basic example: ```ts
function add(a: number, b: number, onAdd: (any, number) => void)
{
onAdd(false, a + b);
}
add(2, 3, (_useless, result) => console.log(2 + 3 = ${result}));
i am not interesting in using the first paramater, but i have to define it if i want to use the second one
giving it a name without _ will bug me about it being unused, so I add it in to mute that
is there a way of disabling it before it can run
disabling it before the game starts
what sgii said and i use it for useless variables and stuff
@spare quartz can u look at a small section of code that im using its ancient and broken and idk how to start fixing it 
i dont really understand it
at all
Show the code bro
And any errors that get thrown
Let me get a good reporting guide
How to Get Help
- Before asking: Try to find the solution yourself. (
CTRL+Fin this specific channel might help you) - Skip "I need help", "Help please", "Can I ask a thing", "I have an error" - It wastes everyone's time. Follow the "How to as a question" guide below.
- This channel can be used to get "help and support", however please take longer sessions out of this channel into DMs.
How to Ask a (Good) Question
- Show your code.
- Show your errors.
- Explain what happens and what you want to happen instead.
- Text is usually better than screenshots. Use code blocks starting with ```lua.
Help Us to Help You
- Run your code before asking if it can work. (errors are often very useful in pin-pointing the issue! )
- Imagine you are the one trying to help. Ask the question in a way that you would want to read!
- Post your full error and the code surrounding that error.
- If you use custom functions in your snippet, show them to us! (we only know how lua works, not how you defined custom functions)
- Actively participate in the "solution-finding" process. (don't expect people to fix the code for you)
- Explain what you tried to do to fix the problem.
- Read the responses you are given.
- Research key words you do not understand before asking what they mean. (come back and ask, if you cannot find them)
No Answer?
- Do not mention uninvolved people to get a response.
- Try to rephrase your question.
- Try to give more context / improve your description.
- Try to find a solution yourself while waiting.
-# Taken from the DJS server.
tool.Equipped:connect(function()
wait()
body.Torso = tool.Parent:FindFirstChild("Torso")
body.LeftArm, body.RightArm, body.LeftShoulder, body.RightShoulder = tool.Parent:FindFirstChild("Left Arm"), tool.Parent:FindFirstChild("Right Arm"), body.Torso:FindFirstChild("Left Shoulder"), body.Torso:FindFirstChild("Right Shoulder")
if body.LeftArm and body.RightArm and body.Torso and body.LeftShoulder and body.RightShoulder then
this may have something to do with it
how do i find which
nvm
its these ones
odd cuz the line where findfirstchild is nil has a value assigned to it
oh
ok so it turns out
the script was erroring because i was playing in r15 and not r6
so smart!!!!
Thsts a fuck ton of reading
It's common sense more than anything
Not a big lua dev
but
i think its
game.workspace.
whatever
W might be capital
no workspace is lowercase
and u dont need game.
i have the exact same thing in another script
but it doesnt work here
local click = workspace.Tycoon.GunBuyer.GBClicker.ClickDetector
click.MaxActivationDistance = 10
here it is in the other script
local click = workspace.Tycoon.Droppers.Dropper1.Dropper1Button.ClickDetector
thats my thoughts after finally getting this to work
bro became a reddit mod
yes
game.Workspace or workspace
lmao
I tried vulkan but gave up immediately and when I made some shitty renderers in opencl it was way easier to use than vulkan plus it let me control every little thing and was still so simple
How tf did khronos even make an api thats so difficult to use
like gpu's are literally just coproccessors with fancy graphic abilities??
opengl was also so cool and then khronos made it difficult and imperfect lmao
idk what im saying I just dont like these api's because from my limited experience they arent that good
even opencl has alot of useless stuff in it
INTELLIJ MY BELOVED
so what i would do (this is extreme even though i do it sometimes) is to create a bindableevent inside one of those scripts, then fire the event whenever you'd like to disable it
then inside the script that you want to disable, you can create a function when the bindable is fired that disables itself:
local bindable = script.BindableEvent
bindable.Event:Connect(function()
script.Enabled = false
end)
this is a bit more of an advanced way to do it but oh well
i just ended up disabling the script in studio manually and then enabling it later with a script
ill keep this in mind for the future tho
thanks
you're welcome :)
I'm learning python
nice
I have a error

NORMAL???
alrighty I'm here to bash my head again
so
bit of a story for context first (turns out I fixed my issue without realizing it so I'm gonna make a bit of a tutorial for people with the same issue)
"Tutorial on how to fix VSCode not importing Python packages installed inside a Virtual Enviornment"
https://docs.google.com/document/d/1_3aGQN7ta4ePKPCkrFxgqq4T4EbhGHjBpd-6Pa9Sz_c/edit?usp=sharing
How to fix VSCode not importing packages installed in a Virtual Environment (Linux Mint) Don't wanna read these two paragraphs? Go to the TLDR. When I started using Linux Mint I installed VSCode to, well, code, duh. Anyway, so I discovered python virtual environments and decided to make one, o...
-@jolly lake
Thank you
yw
(Oh yeah this is for linux mint)
LMFAO.
why are like
