I was making a market plugin. I created my "cases" under the switch($data) value in my form. I got this error when I tried the plugin. What should I do to fix the error? HTML: [22:58:03] [Server thread/CRITICAL]: ErrorException: "Undefined variable: data" (EXCEPTION) in "plugins/[ MarketUI ]/src/MarketUI/AnaForm" at line 33 PHP: if($data == null){ $sender->sendMessage("§7«============[ §aMarket §7]============»\n§cMarket Menusunden Basariyla Ciktin...\n§7«=================================»"); return; }; switch($data){ case 0: $form = Dogal; $form->DogalForm($sender); break; case 1: $form = Insaat; $form->InsaatForm($sender); break; case 2: $form = Ekipman; $form->EkipmanForm($sender); break; case 3: $form = Zirhlar; $form->ZirhlarForm($sender); break; case 4: $form = Tohumlar; $form->TohumlarForm($sender); break; case 5: $form = Diger; $form->DigerForm($sender); break; case 6: $sender->sendMessage("§7«============[ §aMarket §7]============»\n§cMarket Menusunden Basariyla Ciktin...\n§7«=================================»"); return; break; };
Now this code gives me a question... Since I'm not very familiar with PHP, what does php detect "Dogal" in the following code as? PHP: $form = Dogal; Is it detected as a string? Or...does it give you an error :smirk: Edit: Okay so apparently it does return a string when dumped. WHAT???