Jump to content

ride_mystery_boxes error


Recommended Posts

  • Premium

this is my quest

quest ride_mystery_boxes begin
	state start begin
		function Ride( vnum, remain_time )
			ride_info = {
				[71124] = { 20114,	item.get_socket(2)*60,	apply.MOV_SPEED,	0,	1,	false	},
				[71125] = { 20115,	item.get_socket(2)*60,	apply.ATTBONUS_MONSTER,	20,		20,	false	},
				[71126] = { 20116,	item.get_socket(2)*60,	apply.CRITICAL_PCT, 10,	20,	false	},
				[71127] = { 20117,	item.get_socket(2)*60,	apply.CRITICAL_PCT,	10,	20,	false	},
				[71128] = { 20118,	item.get_socket(2)*60,	apply.MALL_DEFBONUS,	10,	20,	false	},
				[71137] = { 20120,	item.get_socket(2)*60,	apply.MOV_SPEED, 0,	1,	false,	false,	false},
				[71138] = { 20121,	item.get_socket(2)*60,	apply.MOV_SPEED, 0,	1,	false,	false,	false},
				[71139] = { 20122,	item.get_socket(2)*60,	apply.MOV_SPEED, 0,	1,	false,	false,	false},
				[71140] = { 20123,	item.get_socket(2)*60,	apply.MOV_SPEED, 0,	1,	false,	false,	false},
				[71141] = { 20124,	item.get_socket(2)*60,	apply.MOV_SPEED, 0,	1,	false,	false,	false},
				[71142] = { 20125,	item.get_socket(2)*60,	apply.MOV_SPEED, 0,	1,	false,	false,	false},
				[7500] = { 20176,	item.get_socket(2)*60,	apply.MOV_SPEED, 0,	1,	false,	false,	false},
				[7501] = { 20177,	item.get_socket(2)*60,	apply.MOV_SPEED, 0,	1,	false,	false,	false},
				[7502] = { 20178,	item.get_socket(2)*60,	apply.MOV_SPEED, 0,	1,	false,	false,	false},
				[7503] = { 20179,	item.get_socket(2)*60,	apply.MOV_SPEED, 0,	1,	false,	false,	false},
				[7504] = { 20180,	item.get_socket(2)*60,	apply.MOV_SPEED, 0,	1,	false,	false,	false},
				[7505] = { 20181,	item.get_socket(2)*60,	apply.MOV_SPEED, 0,	1,	false,	false,	false},
				[7506] = { 20182,	item.get_socket(2)*60,	apply.MOV_SPEED, 0,	1,	false,	false,	false},
				[7507] = { 20183,	item.get_socket(2)*60,	apply.MOV_SPEED, 0,	1,	false,	false,	false},
				[7508] = { 20184,	item.get_socket(2)*60,	apply.MOV_SPEED, 0,	1,	false,	false,	false},
				[7509] = { 20185,	item.get_socket(2)*60,	apply.MOV_SPEED, 0,	1,	false,	false,	false},
				[7510] = { 20186,	item.get_socket(2)*60,	apply.MOV_SPEED, 0,	1,	false,	false,	false},
				[7511] = { 20187,	item.get_socket(2)*60,	apply.MOV_SPEED, 0,	1,	false,	false,	false},
				[7512] = { 20188,	item.get_socket(2)*60,	apply.MOV_SPEED, 0,	1,	false,	false,	false},
				[7513] = { 20189,	item.get_socket(2)*60,	apply.MOV_SPEED, 0,	1,	false,	false,	false},
				[7514] = { 20190,	item.get_socket(2)*60,	apply.MOV_SPEED, 0,	1,	false,	false,	false},
				[7515] = { 20191,	item.get_socket(2)*60,	apply.MOV_SPEED, 0,	1,	false,	false,	false},
				[7516] = { 20192,	item.get_socket(2)*60,	apply.MOV_SPEED, 0,	1,	false,	false,	false},
				[7517] = { 20193,	item.get_socket(2)*60,	apply.MOV_SPEED, 0,	1,	false,	false,	false},
				[7518] = { 20194,	item.get_socket(2)*60,	apply.MOV_SPEED, 0,	1,	false,	false,	false},
				[7519] = { 20195,	item.get_socket(2)*60,	apply.MOV_SPEED, 0,	1,	false,	false,	false},
				[7520] = { 20196,	item.get_socket(2)*60,	apply.MOV_SPEED, 0,	1,	false,	false,	false},
				[7521] = { 20197,	item.get_socket(2)*60,	apply.MOV_SPEED, 0,	1,	false,	false,	false},
				[7522] = { 20401,	item.get_socket(2)*60,	apply.MOV_SPEED, 0,	1,	false,	false,	false},
				[7523] = { 20402,	item.get_socket(2)*60,	apply.MOV_SPEED, 0,	1,	false,	false,	false},
				[7524] = { 20408,	item.get_socket(2)*60,	apply.MOV_SPEED, 0,	1,	false,	false,	false},
				[7525] = { 20409,	item.get_socket(2)*60,	apply.MOV_SPEED, 0,	1,	false,	false,	false},
				[7526] = { 20411,	item.get_socket(2)*60,	apply.MOV_SPEED, 0,	1,	false,	false,	false},
				[7527] = { 20416,	item.get_socket(2)*60,	apply.MOV_SPEED, 0,	1,	false,	false,	false},
				[7528] = { 20417,	item.get_socket(2)*60,	apply.MOV_SPEED, 0,	1,	false,	false,	false},
				[7529] = { 20419,	item.get_socket(2)*60,	apply.MOV_SPEED, 0,	1,	false,	false,	false},
				[7530] = { 23456,	item.get_socket(2)*60,	apply.MOV_SPEED, 0,	1,	false,	false,	false},
				[7531] = { 23456,	item.get_socket(2)*60,	apply.MOV_SPEED, 0,	1,	false,	false,	false},
				[7532] = { 23456,	item.get_socket(2)*60,	apply.MOV_SPEED, 0,	1,	false,	false,	false},
				[7533] = { 23456,	item.get_socket(2)*60,	apply.MOV_SPEED, 0,	1,	false,	false,	false},
				[7534] = { 23456,	item.get_socket(2)*60,	apply.MOV_SPEED, 0,	1,	false,	false,	false},
				[7535] = { 23456,	item.get_socket(2)*60,	apply.MOV_SPEED, 0,	1,	false,	false,	false},
				[7536] = { 23456,	item.get_socket(2)*60,	apply.MOV_SPEED, 0,	1,	false,	false,	false},
				[7537] = { 23456,	item.get_socket(2)*60,	apply.MOV_SPEED, 0,	1,	false,	false,	false},
				[7538] = { 23456,	item.get_socket(2)*60,	apply.MOV_SPEED, 0,	1,	false,	false,	false},
				
				}

			if pc.level < ride_info[vnum][5] then
				say("")
				say(gameforge.ride._010_say)
				say("")
			else
				if 112 == pc.get_map_index() then
					return
				end
				if ride_info[vnum][2] == 0 and remain_time != 0 then
					pc.mount( ride_info[vnum][1], remain_time*60 )
					pc.mount_bonus( ride_info[vnum][3], ride_info[vnum][4], remain_time*60 )
				else
					pc.mount( ride_info[vnum][1], ride_info[vnum][2] )
					pc.mount_bonus( ride_info[vnum][3], ride_info[vnum][4], ride_info[vnum][2] )
				end

				if true == ride_info[vnum][6] then
					pc.remove_item(vnum, 1)
				end	
			end	
		end

		when login begin
			local vnum, remain_time = pc.get_special_ride_vnum()
			if  vnum != 71124 and vnum != 7500 and vnum != 7501 and vnum vnum != 7502 and vnum != 7503 and vnum != 7504 and vnum != 7505 and vnum != 7506 and vnum != 7507 and vnum != 7508 and vnum != 7509 and vnum != 7510 and vnum != 7511 and vnum != 7512 and vnum != 7513 and vnum != 7514 and vnum != 7515 and vnum != 7516 and vnum != 7517 and vnum != 7518 and vnum != 7519 and vnum != 7520 and vnum != 7521 and vnum != 7522 and vnum != 7523 and vnum != 7524 and vnum != 7525 and vnum != 7526 and vnum != 7527 and vnum != 7528 and vnum != 7529 and vnum != 7530 and vnum != 7531 and vnum != 7532 and vnum != 7533 and vnum != 7534 and vnum != 7535 and vnum != 7536 and vnum != 7537 vnum != 7538 and and != 71125 and vnum != 71126 and vnum != 71127 and vnum != 71128 and vnum != 71137 and vnum != 71138 and vnum !=71139 and vnum !=71140 and vnum !=71141 and vnum !=71142  then
				return
			end
			if 0 != vnum then
				ride_mystery_boxes.Ride(vnum, remain_time)
			end
		end

		when 71124.use or 71125.use or 71126.use or 71127.use or 71128.use or 71137.use or 71138.use or 71139.use or 71140.use  or 71141.use or 71142.use or 7500.use or 7501.use  or 7502.use  or 7503.use  or 7504.use  or 7505.use  or 7506.use  or 7507.use  or 7508.use  or 7509.use  or 7510.use  or 7511.use  or 7512.use  or 7513.use  or 7514.use  or 7515.use  or 7516.use  or 7517.use  or 7518.use  or 7519.use  or 7520.use  or 7521.use  or 7522.use  or 7523.use  or 7524.use  or 7525.use  or 7526.use  or 7527.use  or 7528.use  or 7529.use  or 7530.use  or 7531.use  or 7532.use  or 7533.use  or 7534.use  or 7535.use  or 7536.use  or 7537.use  or 7538.use   begin
			 if pc.is_polymorphed() then
				 say("")
				 say(gameforge.ride._020_say)
				 say("")
			elseif false == pc.is_riding() then
			 	if true == horse.is_summon() then
					horse.unsummon()
				end
				 ride_mystery_boxes.Ride(item.vnum, 0)
			 else
				say("")
				 say(gameforge.ride._030_say)
				 say("")
			 end
		end
	end
end

https://metin2.download/picture/te9nQ5p111yQa1vqj9V61k5oVLl1D0s8/.png

 

 

https://metin2.download/picture/XLmTTCww5K7lcmYZAm6W18Rls1p6hO9E/.png

Edited by Metin2 Dev
Core X - External 2 Internal
Link to comment
Share on other sites

 if  vnum != 71124 and vnum != 7500 and vnum != 7501 and vnum vnum != 7502 and vnum != 7503 and vnum != 7504 and vnum != 7505 and vnum != 7506 and vnum != 7507 and vnum != 7508 and vnum != 7509 and vnum != 7510 and vnum != 7511 and vnum != 7512 and vnum != 7513 and vnum != 7514 and vnum != 7515 and vnum != 7516 and vnum != 7517 and vnum != 7518 and vnum != 7519 and vnum != 7520 and vnum != 7521 and vnum != 7522 and vnum != 7523 and vnum != 7524 and vnum != 7525 and vnum != 7526 and vnum != 7527 and vnum != 7528 and vnum != 7529 and vnum != 7530 and vnum != 7531 and vnum != 7532 and vnum != 7533 and vnum != 7534 and vnum != 7535 and vnum != 7536 and vnum != 7537 vnum != 7538 and and != 71125 and vnum != 71126 and vnum != 71127 and vnum != 71128 and vnum != 71137 and vnum != 71138 and vnum !=71139 and vnum !=71140 and vnum !=71141 and vnum !=71142  then

This is the problematic line. Please read it, and you'll see where the error is (There are two, one is the one PACI pointed out, the other one, the one that's currently breaking the compilation is "vnum vnum")

 

 

And thing two: This is the problem of huge lines. You can't easily see little typos. Why don't you use ranges? Less error-prone, shorter, everyone understands it.

if not (vnum >= 7500 and vnum <= 7538) and not (vnum >= 71125 and vnum <= 71128) and not (vnum >= 71137 and vnum <= 71142) then
  return 
end
  • Love 2
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.