Team Spartan Cookies & Milk Forums
  • Issue Tracker
  • Donations
  • Search
  • Member List
  • Help

Register

Team Spartan Cookies & Milk Forums Garry's Mod Starfall v
« Previous 1 … 12 13 14 15 16 … 18 Next »
ShipCore:getShipSize() returning nil values !
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Threaded Mode
ShipCore:getShipSize() returning nil values !
25-07-2015, 10:06 AM, (This post was last modified: 25-07-2015, 10:13 AM by Yuri6037.)
#1
Yuri6037 Offline
TSCM Member
***
Posts: 216
Threads: 45
Joined: Feb 2015
ShipCore:getShipSize() returning nil values !
Hello all,

So this time there is a simple question to ask, no explanations needed.

Is it normal that the ShipCore:getShipSize() method returns nil values as min vector and max vector ?

The code I'm using is :
Code:
local mi, ma = Ship.Core:entity():getShipSize() print(mi) --Printing nothing corresponding to nil value print(ma) --Printing nothing corresponding to nil value --local mic = Ship.Shield:entity():LocalToWorld(mi) This is for future integration, desactivated because LocalToWorls does not exist (I'll again need to --recreate the function) --local mac = Ship.Shield:entity():LocalToWorld(ma) This is same for a future integration so don't make attention. ShipSize = {Min = mi, Max = ma} local x = ShipSize.Min.x --Yay crash because ShipSize.Min = nil !!

(25-07-2015, 10:06 AM)Yuri6037 Wrote: Hello all,

So this time there is a simple question to ask, no explanations needed.

Is it normal that the ShipCore:getShipSize() method returns nil values as min vector and max vector ?

The code I'm using is :
Code:
local mi, ma = Ship.Core:entity():getShipSize() print(mi) --Printing nothing corresponding to nil value print(ma) --Printing nothing corresponding to nil value --local mic = Ship.Shield:entity():LocalToWorld(mi) This is for future integration, desactivated because LocalToWorls does not exist (I'll again need to --recreate the function) --local mac = Ship.Shield:entity():LocalToWorld(ma) This is same for a future integration so don't make attention. ShipSize = {Min = mi, Max = ma} local x = ShipSize.Min.x --Yay crash because ShipSize.Min = nil !!

Strange now today, the values prints correctly !
Well yesterday evening it wasn't working, now it works...
Find
Reply
25-07-2015, 03:31 PM,
#2
Person8880 Offline
gpj.ecafllorT
*******
Posts: 2,407
Threads: 45
Joined: Sep 2013
RE: ShipCore:getShipSize() returning nil values !
There's no way it can be returning nil values. It creates new vectors every time to populate with the current size values. The only explanation would be GMod's Vector type returning nil on creation, which would be a very weird bug and should break a lot more than one Starfall method.
Find
Reply
« Next Oldest | Next Newest »


  • View a Printable Version
Forum Jump:


Users browsing this thread: 1 Guest(s)
Contact UsTeam Spartan Cookies & MilkReturn to TopLite (Archive) ModeMark all forums readRSS Syndication

Powered By MyBB, © 2002-2026 MyBB Group.