Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Lua Development Tools » LDT and Roblox
LDT and Roblox [message #1821590] Mon, 17 February 2020 00:58 Go to next message
Murma Nox is currently offline Murma NoxFriend
Messages: 2
Registered: February 2020
Junior Member
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 #1821604 is a reply to message #1821590] Mon, 17 February 2020 09:40 Go to previous messageGo to next message
Simon Bernard is currently offline Simon BernardFriend
Messages: 341
Registered: July 2009
Senior Member
Hi,

Quote:
I was thinking of something similar to the following:

local Inventory -- #Inventory (mark it as inventory type)
Inventory = require(ReplicatedStorage.Modules.Inventory)


This should works. see : https://wiki.eclipse.org/LDT/User_Area/TipsandTricks#Explicit_Variable_Description_.26_Typing
If it does this is maybe about a mistake in the type name. Look at : https://wiki.eclipse.org/LDT/User_Area/Documentation_Language#Type_references

Quote:
Good evening all. I'm trying to find a new IDE for roblox development and this looks quite promising.


Just to let you know LDT is no more in active development. No more release plan except if some one revives the project.

HTH

Simon
Re: LDT and Roblox [message #1821636 is a reply to message #1821604] Tue, 18 February 2020 02:23 Go to previous message
Murma Nox is currently offline Murma NoxFriend
Messages: 2
Registered: February 2020
Junior Member
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
Previous Topic:Unable to install LDT to Eclipse 2019-12 (4.14.0)
Next Topic:Tilde no longer working in LDT
Goto Forum:
  


Current Time: Tue Sep 29 23:35:42 GMT 2020

Powered by FUDForum. Page generated in 0.01427 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top