Jump to content
  • 0

Can anyone fix this for me please....


Question

Posted

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 !

9 answers to this question

Recommended Posts

  • 0
Posted

no test

input ( .mapList );
	for(.@i = 0; .@i<getarraysize(.level$); .@i++){
		if ( .mapList = .level$[.@i] ){
			goto "S"+.mapList+"";
		} else if (( .level$[.@i] = .mapList ) && ( "0" == .status$[.@i] )){
			mes .n$;
			mes "Unable to find the Floor number. Please enter the Active Floors.";
			close;
		}
	}
  • 0
Posted (edited)

even if you change the goto with callsub, just like aureon said?

then try changing this:
 

goto "S"+.mapList+"";

 

to this:

 

goto "L_S"+.mapList+"";

Edited by benching
  • 0
Posted (edited)

@benching

 

Hi sir , I tried what you said but im still getting the same error sir

[Warning]: Unexpected type for argument 1. Expected label, got C_STR
[Error]: script:goto: not a label
[Debug]: Data: string value="L_S1"
[Debug]: Function: goto
[Debug]: Source (NPC): Teleporter at prontera (150,150)
[Debug]: Data: string value="L_S1"
[Debug]: Source (NPC): Teleporter at prontera (150,150)
Edited by neXus
  • 0
Posted (edited)

@benching

 

what Im trying to do with this script is, using the SQL it contains all the available maps. Once a player unlocked the map the status of it will change from 0 to 1 and then the NPC will recognize this map and the NPC will allow all the players to access this map.


anyone please???

Edited by neXus

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...