Jump to content
  • 0

Ygg to Coup error!


VladimirCastro

Question


  • Group:  Members
  • Topic Count:  114
  • Topics Per Day:  0.03
  • Content Count:  298
  • Reputation:   4
  • Joined:  03/13/12
  • Last Seen:  

prontera.gat,163,185,4 script Cenverter 83,{
   set @name$,"[^FF0000Converter^000000]";
   mes @name$;
   mes "What do you want to do?";
   next;
   switch(select("Information","Convert")) {
       case 1:
           mes @name$;
           mes "I can convert your Coupon/s into Berry and vice versa.";
           mes "1 Coupon = 500 Berry";
           close;
       case 2:
           switch(select("Coupon to Berry","Berry to Coupon")) {
               case 1:
                   if (checkweight(607,500) == 0 ) goto overWeight;
                   if (countitem(7073) < 1) goto noCoupon;
    mes @name$;
    mes "How many coupon to berries?";
    input .@num;
    if (countitem(7073 < .@num){
     mes @name$;
     mes "Insufficient coupon!";
     close;
    }else
    {
                   delitem 7037,.@num;
                   getitem 607,.@num*500;
                   mes @name$;
                   mes "There you go. Hope to see you again!";
                   close;
    }
               case 2:
                   if (checkweight(7073,1) == 0 ) goto overWeight;
                   if (countitem(500) < 1) goto noBerry;
                   mes @name$
                   mes "How many berries to coupon?";
                   input .@num2;
                   if (countitem(607) < .@num2){
                   mes @name$;
                   mes "Insufficient berries!";
                   close;
                  }else
                   {
                   delitem 607,.@num2*500;
                   getitem 7037,.@num;
                   mes @name$;
                   mes "There you go. Hope to see you again!";
                   close;
    }
           }
           end;
   }
noBerry:
   mes @name$;
   mes "I'm Sorry but you don't have enough berries.";
   close;

noCoupon:
   mes @name$;
   mes "I'm Sorry you don't have enough coupon";
   close;
overWeight:
   mes @name$;
   mes "Sorry you're overweight.";
   close;
}

CHECK THE ATTACHMENT TO SEE THE ERROR!

post-3084-0-28083900-1351193330_thumb.jpg

Edited by Euphy
Codeboxed.
Link to comment
Share on other sites

9 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  72
  • Topics Per Day:  0.02
  • Content Count:  2997
  • Reputation:   1131
  • Joined:  05/27/12
  • Last Seen:  

"Equals" is "==".

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  72
  • Topics Per Day:  0.02
  • Content Count:  2997
  • Reputation:   1131
  • Joined:  05/27/12
  • Last Seen:  

On line 13, you wrote "=", which is an invalid operation because it's "==" in C.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

seriously,

    parse_simpleexpr: unmatch ')'
   15 :                     if (checkweight(607,500) == 0 ) goto overWeight;
   16 :                     if (countitem(7073) < 1) goto noCoupon;
   17 :      mes @name$;
   18 :      mes "How many coupon to berries?";
   19 :      input .@num;
*   20 :      if (countitem(7073 < .@num)'{'
   21 :       mes @name$;
   22 :       mes "Insufficient coupon!";
   23 :       close;
   24 :      }else
   25 :      {

    parse_line: need ';'
   31 :      }
   32 :                 case 2:
   33 :                     if (checkweight(7073,1) == 0 ) goto overWeight;
   34 :                     if (countitem(500) < 1) goto noBerry;
   35 :                     mes @name$
*   36 :                     'm'es "How many berries to coupon?";
   37 :                     input .@num2;
   38 :                     if (countitem(607) < .@num2){
   39 :                     mes @name$;
   40 :                     mes "Insufficient berries!";
   41 :                     close;

do you need other people to post out the error for you ?

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2350
  • Joined:  10/28/11
  • Last Seen:  

i guess...he need it xD

line 20

if( countitem(7073) < .@num ){

line 35

mes @name$;

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  114
  • Topics Per Day:  0.03
  • Content Count:  298
  • Reputation:   4
  • Joined:  03/13/12
  • Last Seen:  

i dont really get it

so this is the error?

* 36 : 'm'es "How many berries to coupon?";

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  81
  • Topics Per Day:  0.02
  • Content Count:  1654
  • Reputation:   583
  • Joined:  08/09/12
  • Last Seen:  

mes @name$ ---> mes @name$;

Hmm.. You need to learn how to write a proper script.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  20
  • Topics Per Day:  0.00
  • Content Count:  145
  • Reputation:   15
  • Joined:  01/06/12
  • Last Seen:  

learn how to use c++; LOL

Edited by solid2005
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...