hcgcloud / pterodactyl-sdk

Pterodactyl Panel PHP SDK/API wrapper
https://hcgcloud.github.io/pterodactyl-sdk-docs/
MIT License
27 stars 25 forks source link

Hey there, Could I get some help? #29

Closed SonDerpy closed 3 years ago

SonDerpy commented 3 years ago

So hi there, basically what I want to do while creating servers, is just print out the {"errors":[{"code":"NoViableAllocationException","status":"400","detail":"No allocations satisfying the requirements for automatic deployment were found."}]} and just that. How could I do that? For now I am using ` }catch(\HCGCloud\Pterodactyl\Exceptions\ValidationException $e){ print_r($e->errors());

}`
tyson239 commented 3 years ago

Hi, make sure that you have enabled Allow Automatic Allocation for nodes in this location.

Arisstath commented 3 years ago

Basic PHP knowledge, take a look here https://www.php.net/manual/en/function.json-decode.php