|
| 10 Apr 2013 09:44 AM |
Roblox, of course.
Say, stupidly, you want to long comment a comment:
--[[ print("idk") --[[
for i = 1, #stupids do fix later blah end]]
]]
Lua closes the first long comment with the end of the second one, so you solve this by:
--[=[ print("idk") --[[
for i = 1, #stupids do fix later blah end]]
]=]
However, Roblox's Lua editor doesn't realise this and doesn't recognise the whole thing as a comment.
fix plz |
|
|
| Report Abuse |
|
|
pwnedu46
|
  |
| Joined: 23 May 2009 |
| Total Posts: 7534 |
|
|
| 10 Apr 2013 10:14 AM |
| I do most of my scripting in Eclipse and copy+paste the script into the roblox editor when I need to test or save. |
|
|
| Report Abuse |
|
|
MM233
|
  |
| Joined: 19 Jun 2008 |
| Total Posts: 925 |
|
|
| 10 Apr 2013 10:31 AM |
| I'm sorry... why in the world are you trying to long comment a long comment? You'll have to remove the first one at some point anyway, so stop being lazy and just "move" it to where you want to put the second long comment. It seems like common sense to me... |
|
|
| Report Abuse |
|
|
|
| 10 Apr 2013 10:47 AM |
Heh. I wanted to keep a script that had a long comment in but didn't want to remove that comment while writing a script after it.
It doesn't error. Roblox just can't handle the Luas. |
|
|
| Report Abuse |
|
|
|
| 10 Apr 2013 11:29 AM |
| Did you try putting the [=[ inside the [[? |
|
|
| Report Abuse |
|
|
|
| 10 Apr 2013 11:44 AM |
Hey, that could work.
but I closed it. |
|
|
| Report Abuse |
|
|
itunes89
|
  |
| Joined: 19 Jan 2011 |
| Total Posts: 1957 |
|
|
| 10 Apr 2013 12:22 PM |
| @pwnedu46 Do you get autocomplete to work? Is there a way to import Roblox API? |
|
|
| Report Abuse |
|
|
nairod7
|
  |
| Joined: 26 Mar 2010 |
| Total Posts: 869 |
|
|
| 10 Apr 2013 12:26 PM |
| Why you're using roblox's editor by the way? Use something else like notepad++ or Sublime text 2. I was so scared of losing my work because of a crash (2 years later) |
|
|
| Report Abuse |
|
|
nairod7
|
  |
| Joined: 26 Mar 2010 |
| Total Posts: 869 |
|
| |
|
Sorcus
|
  |
 |
| Joined: 29 Nov 2010 |
| Total Posts: 3775 |
|
|
| 10 Apr 2013 12:27 PM |
Nothing to complain about. Consistent with Visual Studio.
~Sorcus |
|
|
| Report Abuse |
|
|
|
| 10 Apr 2013 12:42 PM |
| It isn't intentional functionality, even if another program does the same. Lua recognises the whole thing as a comment, so the editor should too. |
|
|
| Report Abuse |
|
|
digpoe
|
  |
| Joined: 02 Nov 2008 |
| Total Posts: 9092 |
|
|
| 10 Apr 2013 02:29 PM |
They copied the editor from Visual Studio I bet, if Sorcus says that it's the same.
:l Can't they just implement the Editor as a Lua window? As in, the editor is programmed in Lua.
And don't say it's not possible; I have an editor that has syntax highlighting for Lua and it's programmed in Lua. |
|
|
| Report Abuse |
|
|
|
| 10 Apr 2013 02:38 PM |
| You should give them the code. I would love to have access to the editor from a plugin or something. |
|
|
| Report Abuse |
|
|
Quenty
|
  |
| Joined: 03 Sep 2009 |
| Total Posts: 9316 |
|
|
| 10 Apr 2013 03:32 PM |
"Consistent with Visual Studio." Well, we all know what ROBLOX thinks about that.
http://www.roblox.com/Visual-Studio-Seized-Up-For-45-Seconds-Again-item?id=14083380
"*SIGH* Dear Visual Studio GUI Team: please look up "Multithreading" on Wikipedia, and then implement."
Yeah, *SIGH* Dear Roblox Studio GUI Team....
I copy and paste in from Sublime Text 2 too. I don't think ROBLOX is a very good IDE yet. For example, I would expect autocomplete on something like..
Workspace.Part.Na
Because ROBLOX _could_ get that. I mean, clearly this behavior wouldn't always be wanted, but it still could be helpful, especially for people who don't generate their GUI's.
There's so many improvements ROBLOX could make. For example, whisper chat could be as simple as in the chat GUI script, checking to see if the first letter is '@', and then identifying the name after that, and then doing a tiny bit more in the queue processing system/not rendering it (because I know my system can handle whisper chat, and it's a basic copy of ROBLOX's chat GUI)
Looking over the way ROBLOX has setup it's own services, a whole lot of features they're talking about wouldn't be too hard. Gather together some scripters (No shortage of volunteers for ROBLOX), and have them program some stuff. Quality control it, and you've got tons of features.
That's the great thing about ROBLOX, and I'm not quite sure why we don't have access to some of this stuff.
|
|
|
| Report Abuse |
|
|
digpoe
|
  |
| Joined: 02 Nov 2008 |
| Total Posts: 9092 |
|
|
| 10 Apr 2013 03:41 PM |
@Pre
The only problem is, the editor uses wxLua, as I have the luaforwindows package.
If it were a plugin, ROBLOX would need to let plugins have access to the windows that appear as tabs. |
|
|
| Report Abuse |
|
|
|
| 10 Apr 2013 03:46 PM |
@dig,
When you say 'the windows that appear as tabs', do you mean things such as the explorer and properties? |
|
|
| Report Abuse |
|
|
digpoe
|
  |
| Joined: 02 Nov 2008 |
| Total Posts: 9092 |
|
|
| 10 Apr 2013 03:52 PM |
| No, I am talking about the tabbed windows, like the Script editor and the Start Page. |
|
|
| Report Abuse |
|
|
Validar
|
  |
| Joined: 15 Mar 2013 |
| Total Posts: 276 |
|
|
| 10 Apr 2013 04:05 PM |
lua does not understand validar logic >wants it to repeat looking over scripts >as a seizure with no until >puts until where it wants it >NOPE NOPE NOPE, NEVERMIND /pokerface
"sus" - Validar |
|
|
| Report Abuse |
|
|
Sorcus
|
  |
 |
| Joined: 29 Nov 2010 |
| Total Posts: 3775 |
|
|
| 10 Apr 2013 04:23 PM |
So I just copy pasted your example
--[=[ print("idk") --[[
for i = 1, #stupids do fix later blah end]]
]=]
Into Roblox Lua editor and it identifies it correctly. Are you saying your first example should work? No, it should not.
So, - http://www.roblox.com/ANSWER-item?id=96866902
-- Sorcus |
|
|
| Report Abuse |
|
|
|
| 10 Apr 2013 04:28 PM |
"Nothing to complain about. Consistent with Visual Studio."
You're writing an editor for Lua. If Lua recognizes something as a comment, your editor should. You have absolutely no excuse.
_________________________________________________________________________ I possess 4 ROBUX and 113 tickets. |
|
|
| Report Abuse |
|
|
digpoe
|
  |
| Joined: 02 Nov 2008 |
| Total Posts: 9092 |
|
|
| 10 Apr 2013 04:29 PM |
Atleast let us have access to the tabbed windows that are used for the script windows D:
It would be awesome having a whole new tab appear for having a plugin configuration.
Also, if we can't already; let us read and write files using plugins. Makes configurations much easier :l |
|
|
| Report Abuse |
|
|
|
| 10 Apr 2013 04:35 PM |
@Sorcus
It only happens when you build it up, as if actually doing the code.
So, copy the part not in the first comment, then wirte the --[=[ and ]=].
Also, if you copy the whole thing, then remove the first comment, it registers the entre script afterwards as comment. |
|
|
| Report Abuse |
|
|
|
| 10 Apr 2013 04:38 PM |
@Quenty
dr01d3k4 made a Sublime Text completion file that includes completions (with arguments and argument names included) for the entire Lua API, as well as the LÖVE API. I decided, inspiring from his idea, to write a script that would take the API dump and automatically generate completions for properties, methods, enums, events and callbacks.
I wrote the script and it works and everything (though I didn't include enums). The problem is, however, that ROBLOX's API has over 2200 items, and Sublime Text only accepts up to about 200 completions in the completion list.
I made the script automatically comment all hidden, deprecated or protected members, but that still wasn't enough. I also made it comment all properties (property completion isn't as useful as method, event or callback completion). It's not enough, but, heh, the file's still useful.
If you type 'Game:FindFirs' and then press tab, the following will appear:
"Game:FindFirstChild(name, recursive)"
"name" will be selected, and you will be able to replace it. You can then press tab to automatically select ", recursive" (normally, the comma and the space following it wouldn't be selected, but here, they are because "recursive" is an optional argument).
If you type Game.Chang and then press tab, the following will appear:
Game.Changed:connect(function(property)
end)
"property" will be selected, and if you press tab, the cursor will move to the body of the function.
It also does something different for callbacks (it adds the equal sign and creates the function for you). In the case of properties, it just completes the name of the property and does nothing else, so it's not as useful.
I suppose I'll exclude all the classes that aren't commonly used from the generated file, since Sublime Text only accepts up to 200 completions and I have over 1000 right now. _________________________________________________________________________ I possess 4 ROBUX and 113 tickets. |
|
|
| Report Abuse |
|
|
Sorcus
|
  |
 |
| Joined: 29 Nov 2010 |
| Total Posts: 3775 |
|
|
| 10 Apr 2013 04:53 PM |
@Prehistoricman - It works for all cases for me. I paste stuff partially and fill in or start typing line by line. So, I don't know what you are saying. Does this even happen to the others? Did anyone else even try it?
-- Sorcus |
|
|
| Report Abuse |
|
|