Can anyone fix this for me please....

almarket23

New member
Messages
90
Points
0
Github
nexus
Emulator
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

 
Strange but debug doesnt send me any error. But ingame NPC have nothing to select.

 
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;

}

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

 
Last edited by a moderator:
@@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

 
Back
Top