LDT and Roblox [message #1821590] |
Sun, 16 February 2020 19:58  |
Eclipse User |
|
|
|
Good evening all. I'm trying to find a new IDE for roblox development and this looks quite promising. My only issue is that I'm struggling to require modules for my game.
Roblox lua (rlua) require's work by passing objects pointing towards your scripts, rather than passing a string pointing towards your script. Here is an example:
rlua - local Inventory = require(ReplicatedStorage.Modules.Inventory)
lua - local Inventory = require("ReplicatedStorage.Modules.Inventory")
If I pass it as a string in LDT, the intellisense works beautifully, but the code can't be easily synced to roblox. If I pass it as an object the intellisense breaks and I gain nothing from using this over the default roblox scripting program. Is there any way to trick LDT into thinking a variable is a specific type, and offer autocorrects based on that type's table? I was thinking of something similar to the following:
local Inventory -- #Inventory (mark it as inventory type)
Inventory = require(ReplicatedStorage.Modules.Inventory)
Typing Inventory. would then display all functions and variables related to the Inventory module. Any ideas?
Thanks,
Murmanox xox
|
|
|
|
Re: LDT and Roblox [message #1821636 is a reply to message #1821604] |
Mon, 17 February 2020 21:23  |
Eclipse User |
|
|
|
Thank you very much sir, turns out once I use
local Inventory -- ReplicatedStorage.Modules.Inventory#Inventory
then it works perfectly.
I understand that LDT isn't in development anymore, but I'm really only here for the autocorrect since I won't be able to run the code outside of roblox's studio anyway.
Thanks,
Murmanox
|
|
|
Powered by
FUDForum. Page generated in 0.04758 seconds