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
 

Re: std::bad_cast

Previous Thread :: Next Thread 
thedailyblarg is not online. thedailyblarg
Joined: 26 Feb 2012
Total Posts: 5506
17 Oct 2015 11:17 AM
What the heck is this...
Some sort of lua error I get when I run


local Wire = Instance.new("FloorWire",game.Workspace)
game.Debris:AddItem(Wire,0.1)
Wire.From = Minigun
Wire.Texture = "rbxassetid://180993930"
Wire.Velocity = 5
Wire.WireRadius = 7
Wire.Color3 = Color3.new(1,1,1)
Wire.To = Cart.Cart["Weld Attatchment Of Minigun1"]

and yes everything is a BasePart

The Output:

https://i.gyazo.com/2cf965768ca13106ea927d54ac72cc08.png

Help?
Report Abuse
XxChopSlaperxX is not online. XxChopSlaperxX
Joined: 09 Nov 2010
Total Posts: 3112
17 Oct 2015 11:22 AM
Seems like a c/c++ output
Report Abuse
thedailyblarg is not online. thedailyblarg
Joined: 26 Feb 2012
Total Posts: 5506
19 Oct 2015 08:10 PM
Does anyone know what the heck this is
Report Abuse
MKofOrbiter is not online. MKofOrbiter
Joined: 28 Aug 2010
Total Posts: 910
19 Oct 2015 08:13 PM
C++ error
Report Abuse
LegendaryAccount is not online. LegendaryAccount
Joined: 02 Jun 2010
Total Posts: 13193
19 Oct 2015 08:14 PM
first time I have seen a c++ error in lua
Report Abuse
MKofOrbiter is not online. MKofOrbiter
Joined: 28 Aug 2010
Total Posts: 910
19 Oct 2015 08:18 PM
I think I know why....


Tell me this is this the full script?
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
19 Oct 2015 08:19 PM
Add prints and tell us line number for us who can't open studio thanks.
Report Abuse
thedailyblarg is not online. thedailyblarg
Joined: 26 Feb 2012
Total Posts: 5506
19 Oct 2015 10:52 PM
This is the full script and there is nothing else outside of it besides a

while true do

--STUFF

wait()
end

and after removing it I found that this was what caused the error



Also there are no line numbers, it literally only says the time of which the error occurred and std::bad_cast
Report Abuse
nosyliam is not online. nosyliam
Joined: 29 Jan 2010
Total Posts: 901
19 Oct 2015 10:57 PM
One of the properties that you set cannot hold the value that you put.
E.g Wire.From may not be able to hold Minigun or Wire.To is unable to hold Cart.Cart["Weld Attatchment Of Minigun1"]
Report Abuse
thedailyblarg is not online. thedailyblarg
Joined: 26 Feb 2012
Total Posts: 5506
19 Oct 2015 10:58 PM
what



Sorry I dont even know xD
Report Abuse
cpmoderator12345 is not online. cpmoderator12345
Joined: 26 Jan 2013
Total Posts: 15651
19 Oct 2015 11:07 PM
error from c stack?
no
this is a c++ error
but lua was made in c

https://www.youtube.com/watch?v=-AvRvI9Klu0&t=159s
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
19 Oct 2015 11:24 PM
'error from c stack?
no
this is a c++ error
but lua was made in c'
Who cares, he's using C++ functions Roblox created which is called from C so jokes on you learn your stuff.
Report Abuse
TickerOfTime is not online. TickerOfTime
Joined: 02 Sep 2012
Total Posts: 2030
19 Oct 2015 11:59 PM
I checked the properties best I could. Try commenting out lines and seeing when it works
Report Abuse
cody123454321 is not online. cody123454321
Joined: 21 Nov 2009
Total Posts: 5408
20 Oct 2015 01:30 AM
Indeed.
Lua isn't a standalone thing. It operates on the structs and classes of it's super.
Report Abuse
thedailyblarg is not online. thedailyblarg
Joined: 26 Feb 2012
Total Posts: 5506
20 Oct 2015 03:35 PM
I am pretty sure it has something to do with the FloorWire.

I have rarely seen it ever before...

I guess I will just make an alternative by casting a ray between two objects, inserting a wire-like part in between both CFrames, and then removing it after the next frame runs with game.RunService.RenderStepped:wait()

I'm pretty sure nothing else could be causing this unless it is a property of FloorWire, which then again a FloorWire is scripted into roblox by C++ and C which does go into the main Lua code of ROBLOX so I will just leave it alone.

This thread is still open to people who can at least discover what the error means in terms of scripting... I am assuming it means that a FloorWire could not be cast between those 2 points or a cast of the function (and I forgot what cast meant again >.<) was improper.
Report Abuse
TickerOfTime is not online. TickerOfTime
Joined: 02 Sep 2012
Total Posts: 2030
20 Oct 2015 03:35 PM
I've used FloorWires before, no issue

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