c# - The left-hand side of an assignment must be a variable, a property or an indexer -


hey i'm kinda new unity , i've been trying butt off error right can't seem it.

using unityengine; using unityengine.ui; using system.collections; using unityengine.eventsystems;  public class dropzone : monobehaviour, idrophandler, ipointerenterhandler, ipointerexithandler {     public gameobject gameboard;      void awake()     {         if (gameboard.getcomponent<rules>().yourturna = false)         {             dropzone = null;         }     }      void start()     {     }      public void onpointerenter(pointereventdata eventdata)     {         //debug.log("onpointerenter");         if (eventdata.pointerdrag == null)             return;          draggable d = eventdata.pointerdrag.getcomponent<draggable>();         if (d != null)         {             d.placeholderparent = this.transform;         }     }      public void onpointerexit(pointereventdata eventdata)     {         //debug.log("onpointerexit");         if (eventdata.pointerdrag == null)             return;          draggable d = eventdata.pointerdrag.getcomponent<draggable>();         if (d != null && d.placeholderparent == this.transform)         {             d.placeholderparent = d.parenttoreturnto;         }     }      public void ondrop(pointereventdata eventdata)     {         debug.log(eventdata.pointerdrag.name + " dropped on " + gameobject.name);         draggable d = eventdata.pointerdrag.getcomponent<draggable>();         if (d != null)         {             d.parenttoreturnto = this.transform;         }     } } 

so i'm trying see if it's players turn, if not it's supose keep player moving around cards on gameboard. problem keep getting error

assets/dropzone.cs(16,25): error cs0131: left-hand side of assignment must variable, property or indexer

i unsure refuring because i've tried changing bool int, var, ect. , keep geting error. if can me out, i'd greatful.

if method in class dropzone, trying set class definition of dropzone null, not posible , doesn't make sense. trying set instance of active dropzone null within self, like:

this = null; 

which not posible because trying set class instance null within itself.

what should set instance of dropzone null ever created/contained, like:

var dropzone = new dropzone(); // ...  if (/* conditions */)     dropzone = null; 

hope helped! might little confusing not use unity.


Comments

Popular posts from this blog

c# - Binding a comma separated list to a List<int> in asp.net web api -

Delphi 7 and decode UTF-8 base64 -

html - Is there any way to exclude a single element from the style? (Bootstrap) -