Reborn Posted February 5, 2016 Posted February 5, 2016 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 ! Quote
0 a91323 Posted February 5, 2016 Posted February 5, 2016 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; } } Quote
0 Reborn Posted February 6, 2016 Author Posted February 6, 2016 hi guys Im still getting the same error ** bump.. anyone please? Quote
0 benching Posted February 6, 2016 Posted February 6, 2016 (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 February 6, 2016 by benching Quote
0 Reborn Posted February 6, 2016 Author Posted February 6, 2016 (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 February 6, 2016 by neXus Quote
0 benching Posted February 6, 2016 Posted February 6, 2016 (edited) did not see this earlier,But this script is pretty messed up, what are you trying to do? Edited February 6, 2016 by benching 1 Quote
0 benching Posted February 6, 2016 Posted February 6, 2016 did not see this earlier,But this script is pretty messed up, what are you trying to do? 1 Quote
0 Reborn Posted February 7, 2016 Author Posted February 7, 2016 (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 February 6, 2016 by neXus Quote
Question
Reborn
Can anyone fix this for me please
When I try to execute this. Here is the error im getting
Thanks !
9 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.