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 » Scripting Helpers
Home Search
 

Re: The targeted gui displays: Attempts to yield across the c-call boundary

Previous Thread :: Next Thread 
scrat101 is not online. scrat101
Joined: 26 Jan 2009
Total Posts: 331
08 Sep 2011 08:22 PM
Code:
local a, l = pcall( function()
local GuiLibrary = LoadLibrary("RbxGui")
local PossiblePunishments = {"Ban Player","Walkspeed = -13","Freeze Player","Remove tools","Jail Player","UnFreeze Player"}
local PunishList = GuiLibrary.CreateDropDownMenu(PossiblePunishments, function(tex)
Punishment = tex
end)
PunishList.Name = "ListOfPunishments"
PunishList.Size = UDim2.new(0, 200,0, 40)
PunishList.Position = UDim2.new(0, 190, 0, 180)
PunishList.Parent = script.Parent
end)
if l ~= nil then
script.Parent.EnterPlayerName.Text = l
end

--Someone answer please!
Report Abuse
Cachinnation is not online. Cachinnation
Joined: 21 Aug 2011
Total Posts: 1797
08 Sep 2011 08:24 PM
extra end)?

And I don't think you can use the LoadLibrary() method in pcall
Report Abuse
pwnedu46 is not online. pwnedu46
Joined: 23 May 2009
Total Posts: 7534
08 Sep 2011 08:30 PM
"And I don't think you can use the LoadLibrary() method in pcall"

Yes you can. Why wouldn't you be able to?


~ pwnedu46 ~
Report Abuse
pwnedu46 is not online. pwnedu46
Joined: 23 May 2009
Total Posts: 7534
08 Sep 2011 08:31 PM
@OP: What does the output say. It can sometimes be hard to tell without it.


~ pwnedu46 ~
Report Abuse
crazypotato4 is not online. crazypotato4
Joined: 22 Feb 2010
Total Posts: 20000
08 Sep 2011 08:36 PM
@pwnedu: With that output, I wouldn't be so sure. There could be lots of things in that function that will yield that error when used inside pcall.

Could also be the CreateDropDownMenu function, but I'd have to look at the RbxGui CoreScript for that.
Report Abuse
scrat101 is not online. scrat101
Joined: 26 Jan 2009
Total Posts: 331
08 Sep 2011 08:50 PM
The error is: Attempts to yield across the c-call boundary.
Report Abuse
scrat101 is not online. scrat101
Joined: 26 Jan 2009
Total Posts: 331
08 Sep 2011 08:57 PM
I fixed it in Vist mode, but it still fails in online mode. I think LoadLibrary is the issue. are you sure you can call LoadLibrary in online mode?
Report Abuse
scrat101 is not online. scrat101
Joined: 26 Jan 2009
Total Posts: 331
09 Sep 2011 11:13 PM
bump...
Report Abuse
RenderSettings is not online. RenderSettings
Joined: 16 Aug 2010
Total Posts: 2560
10 Sep 2011 01:06 AM
You can't call wait from inside a pcall.
Report Abuse
RenderSettings is not online. RenderSettings
Joined: 16 Aug 2010
Total Posts: 2560
10 Sep 2011 01:07 AM
To elaborate:I assume that the internal scripts for the API use waits, and since you are calling them from a pcall it errors. Use coroutines instead.
Report Abuse
scrat101 is not online. scrat101
Joined: 26 Jan 2009
Total Posts: 331
11 Sep 2011 02:55 PM
Thanks. I will try that! :D :D :D
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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