fiction Posted September 4, 2012 Posted September 4, 2012 when i start to kill monster i get this error [Error]: run_script: infinity loop ! [Debug]: Source (NPC): Wings_Conf (invisible/not on a map) regards!. Wings_Evo.txt Quote
Emistry Posted September 4, 2012 Posted September 4, 2012 OnNPCKillEvent: freeloop(1); ............... ............ ............... ............... freeloop(0); end; Quote
KeyWorld Posted September 4, 2012 Posted September 4, 2012 No, don't use freeloop here, it will freeze the emulator... Just take a look here, the two loops use the same .@a variable. setarray .@slots[0], 1, 9, 10; // put here your slots. for ( set .@a, 0; .@a < 3 ; set .@a, .@a + 1 ) { set .@e, getequipid ( .@slots[.@a] ); for ( set .@a, 0; .@a < .w2[.@w] ; set .@a, .@a + 1 ) { ... code ... } } I think should be modified with: setarray .@slots[0], 1, 9, 10; // put here your slots. set .@slot_size, getarraysize(.@slots); for ( set .@i, 0; .@i < .@slot_size ; set .@i, .@i + 1 ) { set .@e, getequipid ( .@slots[.@i] ); for ( set .@a, 0; .@a < .w2[.@w] ; set .@a, .@a + 1 ) { ... code ... } } 1 Quote
fiction Posted September 6, 2012 Author Posted September 6, 2012 (edited) i made the changes, no error in consola but the wings doesn't envolved :/ Edited September 6, 2012 by fiction Quote
KeyWorld Posted September 6, 2012 Posted September 6, 2012 It's hard to find the error since the script isn't really user friendly and clean (some bad loops and things). I find one error here: if ( ( getd ( "$Mobs_"+getcharid ( 0 ) ) % getd ( ".a4"+ ( .@w + 1 ) +"_"+ .@id ) ) ) end ; Should be: if ( ( getd ( "$Mobs_"+getcharid ( 0 ) +"_"+ .@e ) % getd ( ".a4"+ ( .@w + 1 ) +"_"+ .@id ) ) ) end ; Edit: And another one (but don't cause you problem right now): setd "$Mobs_"+ getcharid ( 0 ), getd ("$Mobs_"+ getcharid( 0 ) +"_"+ .@e ) + 1; To: setd "$Mobs_"+ getcharid ( 0 ) +"_"+ .@e, getd ("$Mobs_"+ getcharid( 0 ) +"_"+ .@e ) + 1; Edit: And again: setarray .@card[1], getequipcardid ( .slot, 0 ), getequipcardid ( .slot, 1 ), getequipcardid ( .slot, 2 ), getequipcardid ( .slot, 3 ); set .@refine, getequiprefinerycnt ( .slot ); .slot should be replace with .@slots[.@i] each time. Quote
fiction Posted September 6, 2012 Author Posted September 6, 2012 It's hard to find the error since the script isn't really user friendly and clean (some bad loops and things). I find one error here: if ( ( getd ( "$Mobs_"+getcharid ( 0 ) ) % getd ( ".a4"+ ( .@w + 1 ) +"_"+ .@id ) ) ) end ; Should be: if ( ( getd ( "$Mobs_"+getcharid ( 0 ) +"_"+ .@e ) % getd ( ".a4"+ ( .@w + 1 ) +"_"+ .@id ) ) ) end ; Edit: And another one (but don't cause you problem right now): setd "$Mobs_"+ getcharid ( 0 ), getd ("$Mobs_"+ getcharid( 0 ) +"_"+ .@e ) + 1; To: setd "$Mobs_"+ getcharid ( 0 ) +"_"+ .@e, getd ("$Mobs_"+ getcharid( 0 ) +"_"+ .@e ) + 1; Edit: And again: setarray .@card[1], getequipcardid ( .slot, 0 ), getequipcardid ( .slot, 1 ), getequipcardid ( .slot, 2 ), getequipcardid ( .slot, 3 ); set .@refine, getequiprefinerycnt ( .slot ); .slot should be replace with .@slots[.@i] each time. Ok i made the changes, but continue without envolve. Slot for wings => 1. Wings_Evo.txt Quote
Omnipotent Posted September 7, 2012 Posted September 7, 2012 (edited) I had this version some time ago: http://pastebin.com/raw.php?i=DmS5GFsi I dunno if it works, but it looks better than the ugly version attached here. EDIT: Forgot if ( ( getd ( "$Mobs_"+getcharid ( 0 ) ) % getd ( ".a4"+ .@w +"_"+ .@id ) ) ) end ; to: if ( ( getd ( "$Mobs_"+getcharid ( 0 ) +"_"+ .@e ) % getd ( ".a4"+ .@w +"_"+ .@id ) ) ) end ; Edited September 7, 2012 by Omnipotent Quote
fiction Posted September 7, 2012 Author Posted September 7, 2012 (edited) I had this version some time ago: http://pastebin.com/raw.php?i=DmS5GFsi I dunno if it works, but it looks better than the ugly version attached here. EDIT: Forgot if ( ( getd ( "$Mobs_"+getcharid ( 0 ) ) % getd ( ".a4"+ .@w +"_"+ .@id ) ) ) end ; to: if ( ( getd ( "$Mobs_"+getcharid ( 0 ) +"_"+ .@e ) % getd ( ".a4"+ .@w +"_"+ .@id ) ) ) end ; works perfect!. Thx KeyWorld and Omnipotent ! only spam this in the console [Error]: script:delitem: failed to delete 1 items (AID=2000005 item_id=20139). [Debug]: Source (NPC): Wings_Conf (invisible/not on a map) callsub Ids, 20116, 1, 111, 1, 20139, 1, 111, 1, 20122, 1, 111, 0 ; solved. Thx so much ! Edited September 7, 2012 by fiction Quote
Question
fiction
when i start to kill monster i get this error
regards!.
Wings_Evo.txt
7 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.