|
| 03 Apr 2014 10:15 PM |
Output: Attempted to call require with invalid argument(s).
local req = require(game.Workspace.RequireThis) |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 03 Apr 2014 10:18 PM |
| make sure that workspace.RequireThis exists and is a modulescript |
|
|
| Report Abuse |
|
|
|
| 03 Apr 2014 10:21 PM |
Heh, had it in a normal script... sadly error'd again.
Requested module experienced an error while loading |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 03 Apr 2014 10:23 PM |
| Post the script you currently have |
|
|
| Report Abuse |
|
|
|
| 03 Apr 2014 10:26 PM |
Access point: local req = require(game.Workspace.RequireThis)
How I run it: req.sayHello()
moduleScript: local funcTable = { } function funcTable:sayHello() print("Hello World") end
Output: Requested module experienced an error while loading |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 03 Apr 2014 10:27 PM |
| return funcTable in the module script at the bottom |
|
|
| Report Abuse |
|
|
|
| 03 Apr 2014 10:28 PM |
so this...? local funcTable = { } function funcTable:sayHello() print("Hello World") return funcTable end |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 03 Apr 2014 10:29 PM |
| no, at the end of the script. Not function |
|
|
| Report Abuse |
|
|
|
| 03 Apr 2014 10:30 PM |
| Oh... well thanks, seems to work now. All praise lord cntkillme, my forever lover! |
|
|
| Report Abuse |
|
|
|
| 03 Apr 2014 10:36 PM |
Now I added to arguments...
req.sayHello(one, two)
...and it says two is a nil value... |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 03 Apr 2014 10:38 PM |
you call a method like: req:sayHello(one, two) or req.sayHello(req, one, two) |
|
|
| Report Abuse |
|
|
|
| 03 Apr 2014 10:43 PM |
| Thanks, now it works even with the args. :) |
|
|
| Report Abuse |
|
|