Jump to content
×
×
  • Create New...
  • 0

[CLOSED]Error: Excepting "when" or "function"


ic3

Question

Hello. I have a problem when i try to close my server. Yesterday i tryed to install a quest but I received this error:

ef8d0ca5ee16ced6fb4bbba31b8c589d.png

This is the quest that i wanted to install when i received core dumped.

quest welcome begin
state start begin	
when login begin
if pc.getqf("metin2")== 0 then	
pc.setqf( "metin2", 1)
if pc.job == 0 then
pc.give_item2(19,1)
pc.give_item2(11209,1)
pc.give_item2(12209,1)
elseif pc.job == 1 then
pc.give_item2(1009,1)
pc.give_item2(11409,1)
pc.give_item2(12349,1)
elseif pc.job == 2 then
pc.give_item2(19,1)
pc.give_item2(11609,1)
pc.give_item2(12489,1)
elseif pc.job == 3 then
pc.give_item2(7009,1)
pc.give_item2(11809,1)
pc.give_item2(12620,1)
end
pc.change_money(50000)
pc.give_item2(13009,1)
pc.give_item2(14009,1)
pc.give_item2(15009,1)
pc.give_item2(16009,1)
pc.give_item2(17009,1)
pc.give_item2(50051,1)

horse.advance()
horse.ride()
pc.change_alignment(500)
pc.give_item2(50187,1)

syschat("Bine aþi venit pe "..settings.server_name..".")
complete_quest()
end
end	
state __COMPLETE__ begin
end	-- state
end -- state
end -- begin

Resolved. A moderator can close the topic xD

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

5 answers to this question

Recommended Posts

  • 0

You have a state in a state.

Just add one end after line 39 and remove one in live 43.

 

Kind regards

Chuck

The quest resolved now but, i still can`t close my server using sh close.sh . It says kill : no such process

syserr from ch1 core1 : SYSERR: Mar 16 14:48:00 :: socket_connect: HOST IP :65012, could not connect.

SYSERR: Mar 16 14:48:01 :: socket_connect: HOST IP :65011, could not connect.
SYSERR: Mar 16 14:48:02 :: socket_connect: HOST IP .:65010, could not connect.
SYSERR: Mar 16 14:48:03 :: socket_connect: HOST IP :65012, could not connect.
Where is writed IP on the syserr is the ip from my dedicat.
Link to comment
Share on other sites

  • 0

That you have a problem with closing your server is not caused by the quest.

Your close.sh tries to kill the wrong process which is not running.

 

Regards

 

P.S: Because of the "socket_connect" error I think it will close your db core but not the game cores.

  • Love 1
Link to comment
Share on other sites

  • 0

That you have a problem with closing your server is not caused by the quest.

Your close.sh tries to kill the wrong process which is not running.

 

Regards

 

P.S: Because of the "socket_connect" error I think it will close your db core but not the game cores.

Ok then, what i need to do to fix it?

Link to comment
Share on other sites

  • 0
  • Moon
quest welcome begin
	state start begin
		when login begin
			if(pc.getqf("metin2") == 0) then
				pc.setqf("metin2",1)
				if(pc.job == 0) then
					pc.give_item2(19,1)
					pc.give_item2(11209,1)
					pc.give_item2(12209,1)
				elseif(pc.job == 1) then
					pc.give_item2(1009,1)
					pc.give_item2(11409,1)
					pc.give_item2(12349,1)
				elseif(pc.job == 2) then
					pc.give_item2(19,1)
					pc.give_item2(11609,1)
					pc.give_item2(12489,1)
				elseif(pc.job == 3) then
					pc.give_item2(7009,1)
					pc.give_item2(11809,1)
					pc.give_item2(12620,1)
				end
				pc.change_money(50000)
				pc.give_item2(13009,1)
				pc.give_item2(14009,1)
				pc.give_item2(15009,1)
				pc.give_item2(16009,1)
				pc.give_item2(17009,1)
				pc.give_item2(50051,1)
				pc.give_item2(50187,1)
				pc.change_alignment(500)
				horse.advance()
				horse.ride()		
				syschat("Bine aþi venit pe "..settings.server_name)
				set_state(__COMPLETE__)
			end
		end
	end
	state __COMPLETE__ begin
	end
end

Try like this. (I test it. It's work)

 

Regards.

  • Love 1

Plain logic saves lives.

Link to comment
Share on other sites

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.


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.