Jump to content
  • 0

Warper for Item/-Item


noaim90

Question


  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  8
  • Reputation:   0
  • Joined:  08/17/16
  • Last Seen:  

Hi, i am trying to add an warper which warp for an amount of an Item,

and getting these errors:
 

Quote

[Error]:  Loading NPC file: npc/custom/casinowarper.txt
script error on npc/custom/casinowarper.txt line 9
    script:add_word: invalid word. A word consists of undercores and/or alphanumeric characters, and valid variable prefixes/postfixes.
     4 :
     5 : mes "Welcome to Jazeera Casino,";
     6 : mes "the entry costs: 3 EXT";
     7 : switch(select("Enter Casino","Cancel.")) {
     8 :        case 1:
*    9 :                        next;'?'
    10 :                        mes "Lets go, good luck!";
    11 :                        if( .EXT < 3 close;
    12 :                        .EXT -= 3 warp 2,5,1@gef_in,68,170;
    13 :
    14 :                                break;

 

The NPC Code :

Quote

1@gef_in,74,144,3    script    Casino Employee    109,{

set .EXT,7539;

mes "Welcome to Jazeera Casino,";
mes "the entry costs: 3 EXT";
switch(select("Enter Casino","Cancel.")) {
    case 1:
            next;?
            mes "Lets go, good luck!";
            if( .EXT < 3 close;
            .EXT -= 3 warp 2,5,1@gef_in,68,170;
            
                break;
            }
            next;
            mes .name$;
            mes "ok, se you.";
        case 2: goto(OnCancel); break;
        end;
}

 

I dont get it,

Maybe someone is able to help, thanks for your help!

 

// WIthout ? in Line 9 i get error in Line 11

Edited by noaim90
Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 1

  • Group:  Developer
  • Topic Count:  50
  • Topics Per Day:  0.02
  • Content Count:  763
  • Reputation:   227
  • Joined:  02/11/17
  • Last Seen:  

I believe that is not a rA script, so here.

1@gef_in,74,144,3	script	Casino Employee	109,{
	.@EXT = 7539;
	mes "[Casino Employee]";
	mes "Welcome to Jazeera Casino.";
	mes "Casino entry cost: ^0000FF3 "+getitemname(7539)+"^000000.";
	next;
	if(select("Enter Casino:Cancel") == 1){
		if(countitem(.@EXT) < 3){
		mes "[Casino Employee]";
		mes "You don't have enough ^0000FF"+getitemname(.@EXT)+"^000000.";
		close;
		}
		mes "[Casino Employee]";
		mes "Let's go!";
		delitem .@EXT,3;
		warp "1@gef_in",68,170;
		end;
	}
	mes "[Casino Employee]";
	mes "Okay, have a nice day.";
	close;
}
	
	
		

 

Edited by crazyarashi
Link to comment
Share on other sites

  • 0

  • Group:  Developer
  • Topic Count:  153
  • Topics Per Day:  0.04
  • Content Count:  2285
  • Reputation:   745
  • Joined:  06/16/12
  • Last Seen:  

it's obvious. that  after next; -_-

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  8
  • Reputation:   0
  • Joined:  08/17/16
  • Last Seen:  

3 hours ago, noaim90 said:

// WIthout ? in Line 9 i get error in Line 11

@Cydh

 

Thanks a lot works fine @crazyarashi

 

 

Link to comment
Share on other sites

  • 0

  • Group:  Developer
  • Topic Count:  153
  • Topics Per Day:  0.04
  • Content Count:  2285
  • Reputation:   745
  • Joined:  06/16/12
  • Last Seen:  

21 minutes ago, noaim90 said:

@Cydh

 

Thanks a lot works fine @crazyarashi

 

 

of course it will error because missing the red one  if( .EXT < 3 ) close; 

Spoiler

I don't spoonfeeding, that's why I told you error the reason ?

 

Edited by Cydh
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  8
  • Reputation:   0
  • Joined:  08/17/16
  • Last Seen:  

Thanks both,

the 

Quote

+getitemname

is pulling the name from where? 

i had changed item name and picture but now Pooring Coin is pulled there.

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...