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
 

OnServerInvoke problem

Previous Thread :: Next Thread 
TheBenSquare is not online. TheBenSquare
Joined: 13 Dec 2009
Total Posts: 13604
30 Dec 2015 02:34 PM
I have a script that handles RemoteFunctions. The functions are invoked from a local script. Here's the function that seems to have an issue.

Events.hasVoted.OnServerInvoke:connect(function(plr)
if DS:GetDataStore('HasVoted'):GetAsync(plr.userId) then
return true
else
return false
end
end)

The output says this:
OnServerInvoke is a callback member of RemoteFunction; you can only set the callback value, get is not available

I'm pretty confused regarding why I'm getting that error. Can anyone help me solve this?
Report Abuse
OldGoldie is not online. OldGoldie
Joined: 17 Aug 2010
Total Posts: 8210
30 Dec 2015 02:34 PM
Events.hasVoted.OnServerInvoke = function(plr
if DS:GetDataStore('HasVoted'):GetAsync(plr.userId) then
return true
else
return false
end
end
Report Abuse
OldGoldie is not online. OldGoldie
Joined: 17 Aug 2010
Total Posts: 8210
30 Dec 2015 02:35 PM
put a ), i didn't mean to remove it
Report Abuse
OldGoldie is not online. OldGoldie
Joined: 17 Aug 2010
Total Posts: 8210
30 Dec 2015 02:36 PM
Events.hasVoted.OnServerInvoke = function(plr)
if DS:GetDataStore('HasVoted'):GetAsync(plr.userId) then
return true
else
return false
end
end

like this, this is fixed
Report Abuse
MahouReikon is not online. MahouReikon
Joined: 15 Feb 2014
Total Posts: 1359
30 Dec 2015 02:38 PM
I'm guessing it is in a local script or no?


The Legend of Heroes Sen no Kiseki
Report Abuse
MahouReikon is not online. MahouReikon
Joined: 15 Feb 2014
Total Posts: 1359
30 Dec 2015 02:39 PM
Nvm


The Legend of Heroes Sen no Kiseki
Report Abuse
TheBenSquare is not online. TheBenSquare
Joined: 13 Dec 2009
Total Posts: 13604
30 Dec 2015 02:42 PM
Thanks @oldgoldie
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