Lemon Posted January 4, 2016 Share Posted January 4, 2016 Wasn't sure where to post this, but I am getting a strange error from QEdit while trying to create a quest. When running the compatibility check, it is coming back with 'ERROR: Main function (label 0) is undefined'. However, 0: is clearly defined on line 243 of my script (at the bottom). I was wondering if anyone knew what the issue was.script 1: ret 101: nop // we continue with the quest since we're in ult window_msg 'Welcome, I'm glad you've come to test your skills.<cr>Lets's see how far you can get shall we?' winend go_floor 0000001F // warp into olga's lair ret 100: nop // Labo handler start function leti R1, FFFFD8E7 //Position x red gem player. leti R2, 0000001E //Position y red gem player. leti R3, FFFFFF4C //Position z red gem player. leti R4, 000000B4 //Rotation red gem player. p_setpos 00000000, R1 //Tells where to start the continuation of registry strings to be used for the position of the red gem player. leti R1, FFFFD8F6 //Position x green gem player. leti R2, 0000001E //Position y green gem player. leti R3, FFFFFF4C //Position z green gem player. leti R4, 000000B4 //Rotation green gem player. p_setpos 00000001, R1 //Tells where to start the continuation of registry strings to be used for the position of the green gem player. leti R1, FFFFD8DC //Position x yellow gem player. leti R2, 0000001E //Position y yellow gem player. leti R3, FFFFFF45 //Position z yellow gem player. leti R4, 000000B4 //Rotation y yellow gem player. p_setpos 00000002, R1 //Tells where to start the continuation of registry strings to be used for the position of the yellow gem player. leti R1, FFFFD901 //Position x blue gem player. leti R2, 0000001E //Position y blue gem player. leti R3, FFFFFF45 //Position z blue gem player. leti R4, 000000B4 //Rotation blue gem player. p_setpos 00000003, R1 //Tells where to start the continuation of registry strings to be used for the position of the blue gem player. jmpi_= R251, 00000003, 101 p_return_guild window_msg 'Quest is for ultimate only.' winend QEXIT // kick them ret 310: sync chk_ene_num R1 jmp 310 401: nop // this is the waiting in olga main loop nop // 30 frames = 1 second sync addi R124, 1 jmpi_<= R124, 900, 401 // Wait 30 seconds clear R124 ret 405: nop // Poison set_slot_poison R250 ret 406: nop // paralyse set_slot_paralyse R250 ret 407: nop // shock set_slot_shock R250 ret 408: nop // freeze set_slot_freeze R250 ret 409: nop // slow set_slot_slow R250 ret 410: nop // confuse set_slot_confuse R250 ret 411: nop // damage? nop // NOT CODED YET ret 400: nop // This will run in loop to ensure that the player hates life call 401 // this will wait a while get_slotnumber R250 set_slot_jellen R250 set_slot_zelure R250 nop // get a random value to determine what status effect to give leti R150, 6 leti R151, 0 get_random R150, R152 clear R150 clear R151 jmpi_= R152, 0, 405 // Poison jmpi_= R152, 1, 406 // paralyse jmpi_= R152, 2, 407 // shock jmpi_= R152, 3, 408 // freeze jmpi_= R152, 4, 409 // slow jmpi_= R152, 5, 410 // confuse jmpi_= R152, 5, 411 // damage? jmp 400 300: nop // This is what happens when olga's lair is entered p_disablewarp warp_off thread_stg 400 // continually run function 400 until the player leaves room thread_stg 310 // count number of olga's dead ret 10002: nop // This subtracts and cleans subi R2, 01 // subtract 1 from estimated wave value let R1, R2 clear R2 clear R3 clear R5 ret 10001: nop // This loops until it finds the upper wave (the one you died on) add R2, 01 let R3, R2 mul R3, R2 jmp_> R3, R5, 10002 // If R3 > R5 (R2^2 > R1 * 2) jmp 10001 10101: nop // saber 000100 leti R200, 00000000 leti R201, 00000001 leti R202, 00000000 ret 10102: nop // scape doll 030900 leti R200, 00000003 leti R201, 00000009 leti R202, 00000000 ret 10104: nop // iron 031406 leti R200, 00000003 leti R201, 00000014 leti R202, 00000006 ret 10105: nop // iron x2 031406 leti R200, 00000003 // set up 1st one leti R201, 00000014 leti R202, 00000006 leti R205, 00000003 // set up 2nd one leti R206, 00000014 leti R207, 00000006 item_create2 R205, R208 ret 10106: nop // silver 031403 leti R200, 00000003 leti R201, 00000014 leti R202, 00000003 ret 10107: nop // silver x2 031403 leti R200, 00000003 // set up 1st one leti R201, 00000014 leti R202, 00000003 leti R205, 00000003 // set up 2nd one leti R206, 00000014 leti R207, 00000003 item_create2 R205, R208 ret 10108: nop // gold 031404 leti R200, 00000003 leti R201, 00000014 leti R202, 00000004 ret 10109: nop // gold x2 031404 leti R200, 00000003 // set up 1st one leti R201, 00000014 leti R202, 00000004 leti R205, 00000003 // set up 2nd one leti R206, 00000014 leti R207, 00000004 item_create2 R205, R208 ret 10110: nop // crystal 031405 leti R200, 00000003 leti R201, 00000014 leti R202, 00000005 ret 10100: nop // Give Away Items switch_call R1, 10:10101:10102:10102:10104:10105:10106:10107:10108:10109:10110 item_create2 R200, R204 window_msg 'Check your inventory for your reward!' winend ret 10200: nop // Warp home warp_on nop // FINISH LATER 10000: nop // WIN nop // R1 = n*(n+1) / 2 (we approximate R1 = n^2/2) warp_on p_warpenabled let R5, R1 muli R5, 2 leti R2, 00 sync_register R1, R1 // make sure everyone is on the same page (?) p_return_guild // put everyone back to the guild counter call 10001 // determine approximate wave you died on and set R1 call 10100 // dish out items call 10200 // warp home ret 0: set_episode 00000001 //Sets the episode to 2. set_floor_handler 00000012, 100 set_floor_handler 0000001F, 300 BB_Map_Designate 00, 12, 00, 00 //Lets the quest know that floor 0, Labo, map variant 0, unknown. BB_Map_Designate 0A, 1F, 01, 00 exp_multiplication 0 set_qt_success 250 //Lets the guild lady know to go to function 250 when register 255 is set. set_qt_failure 250 //Lets the guild lady know to go to function 300 when register 253 is set. get_slotnumber R250 //Stores the players slot number in register 250. get_difflvl2 R251 //Stores the room's difficulty level in register 251. get_guildcard_num R250, R23 //Stores the players guild card number in register 23. get_gender R250, R24 //Stores the players gender in register 24. get_Section_ID R250, R28 //Stores the players section id in register 28. get_chara_class R250, R29 //Stores the characters class in register 29. initial_floor 000000012 //Tells the quest what floor to start on. call 100 // dialog window ret 1 Quote Link to comment Share on other sites More sharing options...
Soly Posted January 4, 2016 Share Posted January 4, 2016 I'm by no means an expert of this, but did you try to put the label 0 at the beginning? Quote Link to comment Share on other sites More sharing options...
Lemon Posted January 4, 2016 Author Share Posted January 4, 2016 I'm by no means an expert of this, but did you try to put the label 0 at the beginning? That was my first try, then I thought it might have been that it wouldn't recognize labels that it hadn't passed. Actually came to post that I'd figured it out. Turns out all I had to to was open the line up in QEdit and reinsert it (I was working in a different text editor). No idea why this isn't automatic, but that is what fixed it. For anyone else that is doing this kind of thing, make sure to take out all your comments before importing. They (and spaces) will mess up the last argument for the operation. 1 Quote Link to comment Share on other sites More sharing options...
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.
Note: Your post will require moderator approval before it will be visible.