Soybeen
|
  |
| Joined: 17 Feb 2010 |
| Total Posts: 21462 |
|
|
| 02 Jan 2017 08:34 PM |
function FetchData(player) -- find player data, return data end events.DataRequest.OnInvoke:connect(FetchData)
21:31:11.971 - OnInvoke is a callback member of BindableFunction; you can only set the callback value, get is not available
|
|
|
| Report Abuse |
|
|
Soybeen
|
  |
| Joined: 17 Feb 2010 |
| Total Posts: 21462 |
|
|
| 02 Jan 2017 08:35 PM |
What is a callback member/callback value? What does it mean, "set" and "get"?
|
|
|
| Report Abuse |
|
|
|
| 02 Jan 2017 08:36 PM |
| Uh what Let me make some code because idk what your doing. |
|
|
| Report Abuse |
|
|
|
| 02 Jan 2017 08:37 PM |
if it's a callback
then you should be doing events.DataRequest.OnInvoke = func
i think??? i don't remember them working this way either |
|
|
| Report Abuse |
|
|
Soybeen
|
  |
| Joined: 17 Feb 2010 |
| Total Posts: 21462 |
|
|
| 02 Jan 2017 08:39 PM |
Sorry, I'm mixing my understanding with Events, must be.
|
|
|
| Report Abuse |
|
|
|
| 02 Jan 2017 08:43 PM |
[A remote function named "GetProduce" in workspace] [A remote event named "GrowApples" in workspace]
[script 1] local potatos = 23 local apples = 10
workspace.GrowApples.Event:connect(function(num) apples = apples + num end)
function workspace.GetProduce.OnInvoke() return potatos,apples end
[script 2] local function printproduce(p,a) print("Heres todays crop",p,a) end local potatos,apples = workspace.GetProduce:Invoke() printproduce(potatos,apples) workspace.GrowApples:Fire(10) local potatos,apples = workspace.GetProduce:Invoke() printproduce(potatos,apples)
Heres todays crop 23 10 Heres todays crop 23 20
|
|
|
| Report Abuse |
|
|
Soybeen
|
  |
| Joined: 17 Feb 2010 |
| Total Posts: 21462 |
|
|
| 02 Jan 2017 08:46 PM |
Gotchya, very helpful, thanks.
|
|
|
| Report Abuse |
|
|
|
| 02 Jan 2017 08:50 PM |
your notation is wrong, i think
it should be
bindfunc.OnInvoke(args) print(args) end
bindfunc:Invoke("LOL")
Formerly xXTheRobotXx, add 13,349 posts |
|
|
| Report Abuse |
|
|