Advertisement
Guest User

Untitled

a guest
Jun 24th, 2017
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.43 KB | None | 0 0
  1. Code:
  2.  
  3.         stateArray = FindObjectsOfType(typeof(PLAYER_STATE));
  4.  
  5.        
  6.  
  7.         stateDictionary = new Dictionary<string, PLAYER_STATE> ();
  8.  
  9.        
  10.  
  11.         foreach (PLAYER_STATE state in stateArray) {
  12.  
  13.             stateDictionary.Add (state.name, state);
  14.  
  15.            
  16.  
  17.         }
  18.  
  19.  
  20. Error:
  21.  
  22. Assets/Custom Resources/Code/Character/COD_E_PLAYERROOT.cs(79,87): error CS0039: Cannot convert type `System.Type' to `COD_E_PLAYERROOT.PLAYER_STATE[]' via a built-in conversion
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement