Jump to content
  • 0

if else


Sunset

Question


  • Group:  Members
  • Topic Count:  27
  • Topics Per Day:  0.01
  • Content Count:  89
  • Reputation:   3
  • Joined:  05/05/13
  • Last Seen:  

Hi!

If i put the "else" into the script, its not working anymore, otherwise it needs the "else" to has sense. could you help me out?

                if(Zeny <= 100000){mes "You dont have enough zeny";}close;
        else{
        set Zeny, Zeny-100000;
        skilleffect 34,0; sc_start SC_BLESSING,500000,10;
        skilleffect 29,0; sc_start SC_INCREASEAGI,500000,10;
        skilleffect 33,0; sc_start SC_ANGELUS,500000,10;
        skilleffect 74,0; sc_start SC_MAGNIFICAT,500000,5;
        skilleffect 75,0; sc_start SC_GLORIA,500000,5;
        skilleffect 66,0; sc_start SC_IMPOSITIO,500000,5;
        skilleffect 361,0; sc_start SC_ASSUMPTIO,500000,5;}
        close;
 

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  25
  • Topics Per Day:  0.01
  • Content Count:  928
  • Reputation:   170
  • Joined:  04/05/13
  • Last Seen:  

    if(Zeny <= 100000){
        mes "You dont have enough zeny";
        close;
    }
    else{
        set Zeny, Zeny-100000;
        skilleffect 34,0; sc_start SC_BLESSING,500000,10;
        skilleffect 29,0; sc_start SC_INCREASEAGI,500000,10;
        skilleffect 33,0; sc_start SC_ANGELUS,500000,10;
        skilleffect 74,0; sc_start SC_MAGNIFICAT,500000,5;
        skilleffect 75,0; sc_start SC_GLORIA,500000,5;
        skilleffect 66,0; sc_start SC_IMPOSITIO,500000,5;
        skilleffect 361,0; sc_start SC_ASSUMPTIO,500000,5;
        close;
    }

 

  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  27
  • Topics Per Day:  0.01
  • Content Count:  505
  • Reputation:   126
  • Joined:  04/04/16
  • Last Seen:  

because there was a close outside the bracket.   if(Zeny <= 100000){mes "You dont have enough zeny";}close;

Just remove it and it should work fine.

 

 

Edited by Technoken
  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  27
  • Topics Per Day:  0.01
  • Content Count:  89
  • Reputation:   3
  • Joined:  05/05/13
  • Last Seen:  

Oh, thank you guys!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...