skript-mirror icon indicating copy to clipboard operation
skript-mirror copied to clipboard

negate the condition return true

Open Anarchick opened this issue 6 years ago • 4 comments

it seems that "negate the condition" return true and not false , so it's useless to use this expression in skript-mirrror2.0.0SNAPSHOT custom condition. (skript2.4Beta9)

Anarchick avatar Oct 21 '19 12:10 Anarchick

Does this work correctly prior to 2.X? (On 1.X)?

btk5h avatar Oct 21 '19 19:10 btk5h

I made some test, and I don't know if it's normal or not : work (return false):

condition negate:
    check:
        negate the condition
        [...code]
        continue

Does not work:

condition negate:
    check:
        negate the condition

BUT https://skripthub.net/docs/?id=2913 , the doc say that the negate effect stop the code and return false, (I understand that), So It's a bug or an error on the doc ?

Anarchick avatar Oct 23 '19 10:10 Anarchick

The docs are just unclear in this case. Calling negate the condition basically just reverses the effect that the continue effect has. The idea behind it is that you don't have to modify your logic to implement negation.

On Wed, Oct 23, 2019 at 3:48 AM Anarchick [email protected] wrote:

I made some test, and I don't know if it's normal or not : work:

condition negate: check: negate the condition continue```Does not work:

condition negate:
    check:
        negate the condition```
BUT https://skripthub.net/docs/?id=2913 , the doc say that the negate effect stop the code and return false, (I understand that), So It's a bug or an error on the doc ?

—
You are receiving this because you commented.


Reply to this email directly, view it on GitHub
<https://github.com/btk5h/skript-mirror/issues/146?email_source=notifications&email_token=AAXTMJBRRPM46GOVD53A4EDQQATY7A5CNFSM4JC4Q7YKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECA6WGQ#issuecomment-545385242>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAXTMJHHKZTE3AGHKHIPY33QQATY7ANCNFSM4JC4Q7YA>
.

btk5h avatar Oct 23 '19 18:10 btk5h

according to #147 you should allow the return effect to be used

Matocolotoe avatar Oct 25 '19 08:10 Matocolotoe