22,944 questions
Advice
1
vote
1
replies
76
views
Transitioning to Roblox studio language(Luau) from Python/C++
I am an experienced programmer(primarily coming from C++, Python, JS and PHP) moving into Roblox game development. I want to build clean, maintainable systems using Luau but want to avoid the classic ...
Score of 0
0 answers
52 views
Nil return from a function [closed]
I have this programm composed of two file to work on minecraft opencomputer mod
lsc_control.lua :
local component = require("component")
local keyboard = require("keyboard")
Gpu = ...
Score of -2
0 answers
54 views
How do I create a custom telescope picker able to take the search-path in the prompt itself?
I saw TJ DeVries's video regarding advanced telescope usage and built a file navigator (fileseek function in the lua script) very similar (Took AI help).
Intended behaviour: Split the prompt into 2 ...
Score of 2
2 answers
63 views
How to get information from a Block into an Inline in Pandoc with Lua Filter
I am processing an xhtml file with pandoc. The file contains footnotes which are marked in the body with a link targeting an element that is not in the body.
In the AST, the footnotes are contained ...
Advice
0
votes
3
replies
99
views
How do I make my Neovim open specific file instead of splash screen when I execute "nvim" in my shell?
I have a file called "todo", which is basically a text file that stores my todo list. I want to be always reminded of my ongoing task when I open my Neovim. So, when I execute "nvim&...
Best practices
1
vote
2
replies
122
views
How to connect multiple services without creating direct dependencies between them?
(Translated by translator)
I use Roblox Studio for development.
In short, I'm having trouble connecting multiple services. For example, when an event is triggered in Service #1, I need Service #2 to ...
Advice
0
votes
1
replies
93
views
Universal Bresenham
I've tried to make the Bresenhams's algorithm for parabola and catenary.
Is is possible to make it for the any function y = f (x), just the universal solution?
I've tried to make something naive, not ...
Score of 1
1 answer
119 views
Load module only if file exists or fallback to {}
local baz = require("foo.bar") or {}
I was hoping something like this would work but then I renamed bar file I got an error.
bar.lua:
local baz = {}
baz.example = true
return baz
main.lua
-...
Score of -1
1 answer
130 views
FiveM: Player distance inaccurate with DrawMarker Scale
I am trying to create a circular zone in a FiveM GTA V server, but I am having issues with distance calculation between two coordinates. The values I calculate never seem to match the radius used in ...
Score of 1
0 answers
153 views
How to implement a 'look-behind' camera in Roblox without breaking character movement?
I'm trying to make a mechanic where a player can look behind themselves (like in Outlast) while still being able to move in the forward direction, not the direction the camera is now facing (i.e. ...
Score of 4
2 answers
162 views
Why does my lua table randomly lose values when iterating?
i'm writing a small utility for a roblox game. it's just server-side lua, not executor stuff. i'm filtering a list of values before using them for spawn logic. i'm trying to remove numbers lower than ...
Score of 1
1 answer
68 views
Cylinder created through Raycast does not face the meant direction
I've got this string of code in a global script fired from a local script which creates a straight line from the origin of the Raycast to the ending of it, essentialy tracing its trajectory accurately:...
Score of 1
1 answer
100 views
How does Neovim populate the runtimepath at launch?
I am trying to upgrade from Neovim version 0.10.0 to 0.12.0. However, the runtimepath is still configured for version 0.10.0. When I run lua print(vim.inspect(vim.api.nvim_list_runtime_paths())) the ...
Score of 5
2 answers
118 views
What is the significance of making a nested function global in Lua?
This is the Lua version of Knuth's "Man/Boy Test". I found that, to reproduce the result shown in the Wikipedia article, I had to declare the nested function "B" "local"....
Score of 0
1 answer
154 views
overriding conform.nvim via nvim-config-local to stop autoformatting certain files
I have forked kickstart.nvim and cloned it to my machine while also adding nvim-config-local to the require('lazy').setup(...) section of ~/.config/nvim/init.lua. Now I would like to put a .nvim.lua ...