Jump to content
  • 0

Can anyone fix this for me please....


Reborn

Question


  • Group:  Members
  • Topic Count:  104
  • Topics Per Day:  0.03
  • Content Count:  290
  • Reputation:   3
  • Joined:  09/29/13
  • Last Seen:  

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 !

Link to comment
Share on other sites

9 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  15
  • Topics Per Day:  0.00
  • Content Count:  99
  • Reputation:   10
  • Joined:  01/13/12
  • Last Seen:  

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;
		}
	}
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  34
  • Topics Per Day:  0.01
  • Content Count:  281
  • Reputation:   14
  • Joined:  10/14/13
  • Last Seen:  

try replacing goto with callsub

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  104
  • Topics Per Day:  0.03
  • Content Count:  290
  • Reputation:   3
  • Joined:  09/29/13
  • Last Seen:  

hi guys Im still getting the same error :(


** bump.. anyone please?

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  26
  • Topics Per Day:  0.01
  • Content Count:  350
  • Reputation:   43
  • Joined:  09/07/12
  • Last Seen:  

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
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  104
  • Topics Per Day:  0.03
  • Content Count:  290
  • Reputation:   3
  • Joined:  09/29/13
  • Last Seen:  

@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
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  26
  • Topics Per Day:  0.01
  • Content Count:  350
  • Reputation:   43
  • Joined:  09/07/12
  • Last Seen:  

did not see this earlier,
But this script is pretty messed up,

what are you trying to do?

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

  • 0

  • Group:  Members
  • Topic Count:  104
  • Topics Per Day:  0.03
  • Content Count:  290
  • Reputation:   3
  • Joined:  09/29/13
  • Last Seen:  

/ok thanks

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  26
  • Topics Per Day:  0.01
  • Content Count:  350
  • Reputation:   43
  • Joined:  09/07/12
  • Last Seen:  

did not see this earlier,
But this script is pretty messed up,

what are you trying to do?

  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  104
  • Topics Per Day:  0.03
  • Content Count:  290
  • Reputation:   3
  • Joined:  09/29/13
  • Last Seen:  

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