generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Is there a plugin for this yet?

Previous Thread :: Next Thread 
LegendaryAccount is not online. LegendaryAccount
Joined: 02 Jun 2010
Total Posts: 13193
02 Jan 2015 03:30 AM
A plugin that cleans the code up by indenting it properly?
Report Abuse
128GB is not online. 128GB
Joined: 17 Apr 2014
Total Posts: 8056
02 Jan 2015 03:37 AM
Yes
There name was like droid-something
But parts of there name weren't letters they were numbers

It was a girl (Or dressed like one) they had blue hair on their character last I saw
(Im just giving all the details I know of to help find her)
Report Abuse
BothAngles is not online. BothAngles
Joined: 01 Dec 2011
Total Posts: 9604
02 Jan 2015 03:41 AM
no but it is possible i think
Report Abuse
128GB is not online. 128GB
Joined: 17 Apr 2014
Total Posts: 8056
02 Jan 2015 03:44 AM
@Both
I posted 5 minutes before you saying yes its been done before, how can you say it hasn't?
Are you calling me a liar?
Report Abuse
BothAngles is not online. BothAngles
Joined: 01 Dec 2011
Total Posts: 9604
02 Jan 2015 05:08 AM
No I opened this thread before you posted and didn't refresh
Report Abuse
LegendaryAccount is not online. LegendaryAccount
Joined: 02 Jun 2010
Total Posts: 13193
02 Jan 2015 10:01 AM
Bump
Report Abuse
coldkitt is not online. coldkitt
Joined: 05 Jan 2012
Total Posts: 2503
02 Jan 2015 10:04 AM
idk. Try doing a google search.


All toasters,toast toast.
Report Abuse
eLunate is not online. eLunate
Joined: 29 Jul 2014
Total Posts: 13268
02 Jan 2015 10:06 AM
"Yes
There name was like droid-something
But parts of there name weren't letters they were numbers

It was a girl (Or dressed like one) they had blue hair on their character last I saw
(Im just giving all the details I know of to help find her)"

This description reminds me of http://www.roblox.com/User.aspx?ID=72297
Report Abuse
LegendaryAccount is not online. LegendaryAccount
Joined: 02 Jun 2010
Total Posts: 13193
02 Jan 2015 02:13 PM
so that droid person did not make one I guess, I dont want to download hundreds of plugins just to find one to do this
Report Abuse
128GB is not online. 128GB
Joined: 17 Apr 2014
Total Posts: 8056
02 Jan 2015 03:55 PM
Yes that was her, yes she made one

I know because I posted a suggestion in S&I for a studio option to indent scripts with a button (To fix them / add them to scripts without them)
And she posted her plugin script for doing exactly that

It was before plugins could be uploaded to roblox though, when you had to save it as a file on your computer
Report Abuse
LegendaryAccount is not online. LegendaryAccount
Joined: 02 Jun 2010
Total Posts: 13193
02 Jan 2015 04:19 PM
And she quit so theres no chances of me getting it from her ;/
Report Abuse
128GB is not online. 128GB
Joined: 17 Apr 2014
Total Posts: 8056
02 Jan 2015 05:10 PM
You can get it from me ;P
I never actually tested it but she was a good scripter so I assume it does / did

Credit to Dr01d3k4 (Obviously)


local function getCount(lookIn, findString)
local c = 0;
local w = "";
for m1, m2 in lookIn:gmatch("([%w]*)"..findString.."(%w*)") do
if ((m1 == "") and (m2 == "")) then
c = c + 1;
end
end
return c;
end

local function autoFormat(c, tabChar)
tabChar = tabChar or "\t";
local newCode = { };
local curTabAmount = 0;
if (not c:match("^.-\n$")) then
c = c.."\n";
end
for ln in c:gmatch("(.-)\n") do
ln = ln:gsub("^%s*(.+)", "%1");
local oldTabAmount = curTabAmount;
local totCount = getCount(ln, "function") + getCount(ln, "if") + getCount(ln, "do") + getCount(ln, "repeat") - getCount(ln, "end") - getCount(ln, "until");
curTabAmount = curTabAmount + totCount;
ln = tabChar:rep((totCount > 0) and oldTabAmount or curTabAmount)..ln;
newCode[#newCode + 1] = ln;
end
newCode[#newCode + 1] = "";
return table.concat(newCode, "\n");
end

PluginManager():CreatePlugin()
:CreateToolbar("Auto Tabber")
:CreateButton("Auto Tabber", "Auto Tabber", "").Click:connect(function ()
local sc = game.Selection:Get()[1];
if (sc == nil) then print("Please select a script"); return; end
if (not sc:IsA("BaseScript")) then print("Please select a script"); return; end
sc.Source = autoFormat(sc.Source);
print("Formatted game."..sc:GetFullName());
end);
Report Abuse
128GB is not online. 128GB
Joined: 17 Apr 2014
Total Posts: 8056
02 Jan 2015 05:17 PM
Just a note

If there is a comment like

--[[This part is the part to do cool things]]

It counts that 'do' as needing tabbed even though its in a comment

There are non roblox lua indenters you can use though
Report Abuse
Funse is not online. Funse
Joined: 11 Jun 2012
Total Posts: 7887
02 Jan 2015 05:18 PM
:P
Ameuture.
Report Abuse
lordrambo is not online. lordrambo
Joined: 16 Jun 2009
Total Posts: 20628
02 Jan 2015 05:21 PM
You could edit it to only indent if there isn't a "--" between the keyword and the last tab down.
Report Abuse
128GB is not online. 128GB
Joined: 17 Apr 2014
Total Posts: 8056
02 Jan 2015 05:21 PM
This was my idea
https://twitter.com/CaptainSandbox/status/339176866848075776/photo/1
Report Abuse
128GB is not online. 128GB
Joined: 17 Apr 2014
Total Posts: 8056
02 Jan 2015 05:22 PM
'Ameuture.'

It wasn't my script and she wasn't an amateur, I think she might have made it just to show me why we didn't need it built into studio
Report Abuse
Funse is not online. Funse
Joined: 11 Jun 2012
Total Posts: 7887
02 Jan 2015 05:23 PM
I was kidding.
Couldn't you see the ':P'.
:P
Report Abuse
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
02 Jan 2015 05:26 PM
Last I checked, ":P" doesn't mean you are not being serious.
Report Abuse
Funse is not online. Funse
Joined: 11 Jun 2012
Total Posts: 7887
02 Jan 2015 05:28 PM
sorry
:P
Report Abuse
lordrambo is not online. lordrambo
Joined: 16 Jun 2009
Total Posts: 20628
02 Jan 2015 05:28 PM
"Instance.new("PlayerGUI",workspace)"
lol

I know popular IDEs have this feature.
Report Abuse
128GB is not online. 128GB
Joined: 17 Apr 2014
Total Posts: 8056
02 Jan 2015 05:32 PM
Whats a IDEs

And o.O I wonder what I was trying to do, that was 27 May 2013 so I don't remember
Report Abuse
lordrambo is not online. lordrambo
Joined: 16 Jun 2009
Total Posts: 20628
02 Jan 2015 05:33 PM
You don't know what an IDE is? It's an integrated development environment. Eclipse, VS13, etc. ROBLOX Studio is an integrated scripting environment though.
Report Abuse
128GB is not online. 128GB
Joined: 17 Apr 2014
Total Posts: 8056
02 Jan 2015 05:36 PM
Oh wait

I was confused
I thought you were saying

"Instance.new("PlayerGUI",workspace)"
lol I know popular IDEs have this feature.


You meant

"Instance.new("PlayerGUI",workspace)"
lol

I know popular IDEs have a reindent feature
Report Abuse
LegendaryAccount is not online. LegendaryAccount
Joined: 02 Jun 2010
Total Posts: 13193
02 Jan 2015 06:14 PM
I published it so other people can use it

http://www.roblox.com/Auto-Indenter-item?id=199822087
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image