Jump to content
  • 0
almarket23

Can anyone fix this for me please....

Question

Can anyone fix this for me please

 

prontera,150,150,5	script	Teleporter	1_M_YOUNGKNIGHT,{

set .n$,"[ Teleporter ]";

mes .n$;
mes "Please enter the Floor Number.";
mes "===============================";
mes "List of Active Maps";
if(query_sql ("SELECT id, name, level, status FROM npc ", .id$, .name$, .level$, .status$ )){
	for (.@i = 0; .@i < getarraysize(.status$); .@i += 1) { 
		if ( "1" == .status$[.@i] ) {
			mes ""+.name$[.@i]+"";
			}
		}
	}	
	
next;
input ( .mapList );
	if ( .mapList = .level$ ){
		goto "S"+.mapList+"";
		} else if (( .level$ = .mapList ) && ( "0" == .status$ )){ 
			mes .n$;
			mes "Unable to find the Floor number. Please enter the Active Floors.";
			close;
			}
			
S1:    warp"prontera",150,155;	end;
S2:	warp"prontera",150,155;	end;
S3:	warp"prontera",150,155;	end;
S4:	warp"prontera",150,155;	end;
S5:	warp"prontera",150,155;	end;

}

When I try to execute this. Here is the error im getting

 

[Warning]: Unexpected type for argument 1. Expected label, got C_STR
[Error]: script:goto: not a label
[Debug]: Data: string value="S1"
[Debug]: Function: goto
[Debug]: Source (NPC): Teleporter at prontera (150,150)
[Debug]: Data: string value="S1"
[Debug]: Source (NPC): Teleporter at prontera (150,150)

 

Thanks

Share this post


Link to post
Share on other sites

6 answers to this question

Recommended Posts

  • 0


prontera,150,150,5 script Teleporter 1_M_YOUNGKNIGHT,{

.n$ = "[ Teleporter ]";

mes .n$;

mes "Please enter the Floor Number.";

mes "===============================";

mes "List of Active Maps";

if (query_sql("SELECT id, name, level, status FROM npc ", .@id, .@name$, .@level, .@status)) {

for (.@i = 0; .@i < getarraysize(.@status); .@i++) {

if (.@status[.@i] == 1) {

mes .@name$[.@i];

}

}

}

next;

input(.@mapList);

for (.@i = 0; .@i < getarraysize(.@status); .@i++) {

if ( .@mapList == .@level && .@status == 1 ) {

switch(select(.@mapList)){

case 1:

warp "prontera", 150, 155;

break;

case 2:

warp "prontera", 150, 155;

break;

case 3:

warp "prontera", 150, 155;

break;

case 4:

warp "prontera", 150, 155;

break;

case 5:

warp "prontera", 150, 155;

break;

default:

mes "No Warp Location Specified";

close;

}

}

}

mes .n$;

mes "Unable to find the Floor number. Please enter the Active Floors.";

close;

}

Share this post


Link to post
Share on other sites
  • 0

@@Dastgir

 

Hi I tried the script but Im getting this error

 

[Warning]: Unexpected type for argument 1. Expected string.
[Debug]: Data: variable name='.@mapList' index=0
[Debug]: Function: select
[Debug]: Source (NPC): Teleporter at prontera (150,150)


 

and also the only option the this NPC recognize is the first option, even if the status of the other list is already 1 in database

Edited by almarket23

Share this post


Link to post
Share on other sites
  • 0

@@Angelmelody

 

Im still getting the same error.

 

 

Can anyone fix the script for me please.



anyone please???



NVM already fixed the script

 

Thanks to @@Dastgir who fixed the script for and also to those who tried on fixing and giving me solution. Thanks alot

Share this post


Link to post
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.   Restore formatting

  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.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.