Jump to content

Recommended Posts

"when kill or party_kill with pc.getqf("antiexp") == 1 begin
                .....do something....
        end"

or

"when kill or party_kill  begin
            if pc.getqf("antiexp") == 1 then
                .....do something....
            end
        end"

Which is better and why? or are the same as efficiency?

Link to comment
https://metin2.dev/topic/16795-using-with-or-if/
Share on other sites

  • Honorable Member

if you would use that "if" without an "else" or "elseif", then you can just use "with", since there are no other ways that code can go to.

 

Don't talk about performance for such meaningless things.

 

The first one is better, but only cause of readability.

  • Love 1

 

"Nothing's free in this life.

Ignorant people have an obligation to make up for their ignorance by paying those who help them.

Either you got the brains or cash, if you lack both you're useless."

Syreldar

Link to comment
https://metin2.dev/topic/16795-using-with-or-if/#findComment-92629
Share on other sites

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.