|
| 07 Sep 2011 10:02 AM |
self = PluginManager():CreatePlugin() mouse = self:GetMouse() selection = game:GetSelection() toolbar = self:CreateToolbar("Copy") toolbarbutton = toolbar:CreateButton("Copy", "Copier", "add.png") toolbarbutton.Click:connect(function()) selection:clone() end) end
Output: CopyPlugin.lua:6: unexpected symbol near ')' It's a plugin, that is supposed to show itself with a button and copy whatever you have selected. I would set it at Workspace only except I would like to be able to copy just about anything. |
|
|
| Report Abuse |
|
|
GoldenUrg
|
  |
| Joined: 23 Aug 2009 |
| Total Posts: 6428 |
|
|
| 07 Sep 2011 10:11 AM |
line 6 has an extra ):
toolbarbutton.Click:connect(function()) selection:clone() end)
should be
toolbarbutton.Click:connect(function() selection:clone() end) |
|
|
| Report Abuse |
|
|
|
| 07 Sep 2011 10:19 AM |
Then we get this in Output: CopyPlugin.lua:9: '-eof-' expected near 'end' the -- around eof are for <>. |
|
|
| Report Abuse |
|
|
GoldenUrg
|
  |
| Joined: 23 Aug 2009 |
| Total Posts: 6428 |
|
|
| 07 Sep 2011 10:24 AM |
| http://wiki.roblox.com/index.php/Common_Scripting_Mistakes#Confusing_Error_Messages |
|
|
| Report Abuse |
|
|
|
| 07 Sep 2011 10:29 AM |
Done that, seen it. Tried to revise script, new version is
self = PluginManager():CreatePlugin() mouse = self:GetMouse() selection = game.Workspace.Selection:Get() toolbar = self:CreateToolbar("Copy") toolbarbutton = toolbar:CreateButton("Copy", "Copier", "add.png")--Remove ", "linkedit.png"" unless you know what it means!!!!! (or change it if you really know what your doing!) toolbarbutton.Click:connect(function() selection:clone() end)
Output: Selection is not a valid member of Workspace
|
|
|
| Report Abuse |
|
|
| |
|
| |
|
| |
|
| |
|
| |
|
GoldenUrg
|
  |
| Joined: 23 Aug 2009 |
| Total Posts: 6428 |
|
|
| 28 Sep 2011 11:33 PM |
| http://wiki.roblox.com/index.php/RBX.lua.Selection_(Service) |
|
|
| Report Abuse |
|
|
|
| 28 Sep 2011 11:46 PM |
| Selection::Get() returns a table of instances, not an actual instance (because that's going to be giving you trouble later). |
|
|
| Report Abuse |
|
|