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
 

Never seen this before

Previous Thread :: Next Thread 
ajmhm1111 is not online. ajmhm1111
Joined: 22 Jun 2013
Total Posts: 164
07 Jun 2014 11:27 AM
Can anyone explain in english without simply regurgitating the error message, explain what this means:

attempt to yield across metamethod/C-call boundary
attempt to call nil value

Thanks, the two errors are simultaneous, no line is given.

--ajmhm1111
Report Abuse
mew903 is not online. mew903
Joined: 03 Aug 2008
Total Posts: 22071
07 Jun 2014 11:29 AM
You need to post the source, that error is very broad and could mean a number of things
Report Abuse
ajmhm1111 is not online. ajmhm1111
Joined: 22 Jun 2013
Total Posts: 164
07 Jun 2014 11:31 AM
You said post the source. Here you go:

local Plugin_Name = "Stuff"

print(Plugin_Name," is loading please wait")

wait(1)

Plugin = PluginManager():CreatePlugin(Plugin_Name)
Plugin:Activate(true)
Mouse = Plugin:GetMouse()

Workspace = game:GetService"Workspace"

Scriptable = Enum.CameraType.Scriptable

local CoreGui = game:GetService("CoreGui")

local gui = Instance.new("ScreenGui",CoreGui)

local function roundTo(num,by)
return math.floor(num/by + 0.5) * by
end

local function isNumber(str)
return tonumber(str) ~= nil
end

local function log(str)
print(str);--Will change to some sort of log later.
end

local function getHourTimeMinute()
local t = tick()
local hour = tostring(roundTo(((t / 3600) % 24),1))
local minute = tostring(roundTo(((t / 60) % 60),1))
local second = tostring(roundTo((t % 60),1))

return string.format("%i:%.2i:%.2i",hour,minute,second)
end
--:%.2i %s
--!Create one and only bit of the GUI

local tb = Instance.new("TextBox",gui)
tb.Size = UDim2.new(1,0,0.05,0)
tb.Position = UDim2.new(0,0,1,0)
tb.BackgroundColor3 = Color3.new(0,0,0)
tb.TextXAlignment = "Left"
tb.TextYAlignment = "Bottom"
tb.TextColor3 = Color3.new(1,1,1)
tb.TextScaled = true
tb.Text = ""
tb.ClearTextOnFocus = false

--Creating log
local logbck = Instance.new("ImageLabel",gui)
logbck.Image = "http://www.roblox.com/asset/?ID=160320059"
logbck.ImageTransparency = 0.2
logbck.Size = UDim2.new(0.3,0,0.8,0)
logbck.Position = UDim2.new(1,0,0.1,0)--Hidden
logbck.BackgroundTransparency = 1

local logtl = Instance.new("TextLabel",logbck)
logtl.Text = "Jazz Productions Command Log"
logtl.TextScaled = true
logtl.Size = UDim2.new(1,0,0.1,0)
logtl.BackgroundTransparency = 1

local logContainer = Instance.new("ScrollingFrame",gui)
logContainer.Size = UDim2.new(1,0,0.9,0)
logContainer.BackgroundTransparency = 1;
logContainer.Position = UDim2.new(0,0,0.1,0)

local toggleOpen,logOpen = false,false;

local charSpawner

cam = Workspace:WaitForChild("Camera")

Spawn(function() --Used for Setting PlayerSpawn
repeat wait() until game.Players:FindFirstChild"Player1"
repeat wait() until game.Players.Player1.Character:FindFirstChild"Humanoid"
game.Players.Player1.Character:MoveTo(Workspace["F6 Spawner"].Value)
end)


if not Workspace:FindFirstChild("F6 Spawner") then
charSpawner = Instance.new("Vector3Value",Workspace)
charSpawner.Name = "F6 Spawner"
else
charSpawner = Workspace["F6 Spawner"]
end

local function separateElementsBy(str,separateBy)
local t = {}
for elmt in string.gmatch(str,"[^"..separateBy.."]+") do
table.insert(t,#t + 1,elmt)
end
return t
end


Configuration = {
settings = {
["prefix"] = "/";
["showLog"] = false;--Default Can Change;
};
commands = {
["setplayerspawn"] = function()
Workspace["F6 Spawner"].Value = cam.CoordinateFrame.p
print("Set the Players spawn to ",cam.CoordinateFrame.p)
end;
["togglegui"] = function()
if not toggleOpen then
tb:TweenPosition(UDim2.new(0,0,0.95,0),"Out","Quad",0.4)
wait(0.4)
toggleOpen = true
tb.Text = (tb.Text == "") and Configuration.settings.prefix or tb.Text
tb:CaptureFocus()
elseif toggleOpen then
tb:TweenPosition(UDim2.new(0,0,1,0),"Out","Quad",0.4)
wait(0.4)
toggleOpen = false
end
end;
["bind"] = function(key,functionToBindTo,override)
key = key:lower()
functionToBindTo = functionToBindTo:lower()
if key:len() > 1 then return log("Sorry "..key.." is not a valid key") end
if not Configuration.commands[functionToBindTo] then return log("Sorry the function"..functionToBindTo.." does not exist") end
if (Configuration.bindings[key] and override == "true") or not Configuration.bindings[key] then
Configuration.bindings[key] = Configuration.commands[functionToBindTo]
else
log("Sorry "..key.." already has something bound to it and you said not to override keys")
end
end;
["spawnpart"] = function()
Instance.new("Part",Workspace).Position = cam.CoordinateFrame.p
end;
["setroll"] = function(roll)
if not isNumber(roll) then return log((roll) and "Sorry "..roll.." is not a valid number" or "You did not include a number") end
cam.CameraType = Scriptable;
cam:SetRoll(roll)
print("You CameraType has been set to Scriptable, if you were wondering why you can't move your camera\nYou can use the resetCamera command to reset your command!")
end;
["resetcamera"] = function()
cam.CameraType = "Follow";
end;
["togglelog"] = function()
if not toggleLog then
toggleLog = true
logbck:TweenPosition(UDim2.new(0.7,0,0.1,0),"Out","Quad",0.4)
else
toggleLog = false
logbck:TweenPosition(UDim2.new(1,0,0.1,0),"Out","Quad",0.4)
end
end;
["clearlog"] = function()
logContainer:ClearAllChildren()
end;
};
bindings = {
["t"] = function()
Configuration.commands.togglegui();
end;
["r"] = function()
Configuration.commands.setplayerspawn();
end;
}
}


Mouse.KeyUp:connect(function(key)
if Configuration.bindings[key:lower()] then
Configuration.bindings[key:lower()]()
end
end)


tb.FocusLost:connect(function(enter)
if enter then

local t = tb.Text
if t:sub(1,1) ~= Configuration.settings.prefix then print("\nYou have used the incorrect prefix:\n"..t:sub(1,1).."\n instead of \n"..Configuration.settings.prefix) return end

local elements = separateElementsBy(t," ")
if Configuration.commands[elements[1]:sub(2,#elements[1]):lower()] then
local func = Configuration.commands[elements[1]:sub(2,#elements[1]):lower()]
table.remove(elements,1)
xpcall(function()
func(unpack(elements))
end,log)
else
log(elements[1]:sub(2,#elements[1]):lower().." is not a valid function?")
end

end
end)
print(string.format("%s has loaded at:\n%s",Plugin_Name,getHourTimeMinute()));

--ajmhm1111
Report Abuse
ajmhm1111 is not online. ajmhm1111
Joined: 22 Jun 2013
Total Posts: 164
07 Jun 2014 11:32 AM
Wow, the way the forum posted that, makes it look horrible :(

--ajmhm1111
Report Abuse
mew903 is not online. mew903
Joined: 03 Aug 2008
Total Posts: 22071
07 Jun 2014 11:35 AM
It sounds like you're trying to use wait() within xpcall(), which you can't do. Try using ypcall instead
Report Abuse
ajmhm1111 is not online. ajmhm1111
Joined: 22 Jun 2013
Total Posts: 164
07 Jun 2014 11:39 AM
Thanks. Good to now for the future.

--ajmhm1111
Report Abuse
BlueTaslem is not online. BlueTaslem
Joined: 11 May 2008
Total Posts: 11060
07 Jun 2014 12:04 PM
For the other one, "attempt to call a nil value" without a stack trace almost always mean that you are passing `nil` to a `:connect`.
Report Abuse
ajmhm1111 is not online. ajmhm1111
Joined: 22 Jun 2013
Total Posts: 164
07 Jun 2014 12:53 PM
That's also very good to know, that you BlueTaslem.

--ajmhm1111
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