Guest User

Untitled

a guest
Dec 15th, 2018
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.53 KB | None | 0 0
  1. private var cellCoords = new List.<Vector3>();
  2. private var occupiedCoords = new List.<Vector3>();
  3.  
  4. function randomUnoccupiedCoord () {
  5.     var unoccupiedCells = new List.<Vector3>();
  6.     unoccupiedCells = cellCoords.Except( occupiedCoords ).ToList(); // Line 46, the error line
  7.     return unoccupiedCells;
  8. }
  9.  
  10. // The Error
  11. // InvalidCastException: Cannot cast from source type to destination type.
  12. // gameDriver.randomUnoccupiedCoord () (at Assets/Rewrite/gameDriver.js:46)
  13. // gameDriver.Start () (at Assets/Rewrite/gameDriver.js:21)
Add Comment
Please, Sign In to add comment