CortexPE / Commando

A Command Framework virion for PocketMine-MP
GNU Lesser General Public License v3.0
70 stars 53 forks source link

Error messages #5

Closed lukeeey closed 5 years ago

lukeeey commented 5 years ago

Take a look at the following screenshots. You can clearly see theres too many error messages being fired, when not all of these even apply.

I mean how can i have too many arguments but also have insufficient arguments lol

image

image

lukeeey commented 5 years ago

Also the usage is incorrect in console

lukeeey commented 5 years ago

Also see that it crashes when no arguments are specified @CortexPE

jasonw4331 commented 5 years ago

It must be a fault in your code because I'm not getting the same issues with MyPlot. What did you put in your SessionArgument and RandNameEnumArgument classes?

lukeeey commented 5 years ago

its a copy of MemberArgument essentially from cortex's other plugin

image

image

lukeeey commented 5 years ago

No, its not an issue with the enum name because i just changed it and that wouldnt affect the console anyway @jasonwynn10

CortexPE commented 5 years ago

You need to handle the checks for the $args array, you need to check if the arguments you're looking for are in the array

On Mon, Jun 3, 2019, 12:44 AM Luke notifications@github.com wrote:

Also see that it crashes when no arguments are specified @CortexPE https://github.com/CortexPE

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/CortexPE/Commando/issues/5?email_source=notifications&email_token=AEHQQFA7PFBK4EKSNQ3KQCDPYP2G5A5CNFSM4HSC5KDKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWXZPDA#issuecomment-498046860, or mute the thread https://github.com/notifications/unsubscribe-auth/AEHQQFFP2ZZXYGBOVS5N373PYP2G5ANCNFSM4HSC5KDA .

lukeeey commented 5 years ago

@CortexPE Yes but why can you not make it parse arguments in order?

At least make it optional

lukeeey commented 5 years ago

The main problem here is that, yes, i gave an invalid value for the enum argument, however it is also telling me that i have too many and too little arguments. wtf? thats not possible? I should only get the invalid value error

image

CortexPE commented 5 years ago

Yeah that is an issue xd

On Mon, Jun 3, 2019, 8:26 PM Luke notifications@github.com wrote:

The main problem here is that, yes, i gave an invalid value for the enum argument, however it is also telling me that i have too many and too little arguments. wtf? thats not possible? I should only get the invalid value error

[image: image] https://user-images.githubusercontent.com/32024335/58801704-31cc3080-8603-11e9-9cc7-5025fe2a39a5.png

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/CortexPE/Commando/issues/5?email_source=notifications&email_token=AEHQQFB45TZ5RFU26MSZQ4TPYUEYLA5CNFSM4HSC5KDKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWZHPYQ#issuecomment-498235362, or mute the thread https://github.com/notifications/unsubscribe-auth/AEHQQFC34C5BXD4NGHF47NTPYUEYLANCNFSM4HSC5KDA .