Jump to content
  • 0
Sign in to follow this  
ic3

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

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

Share this post


Link to post

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.

Share this post


Link to post
  • 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

Share this post


Link to post
  • 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?

Share this post


Link to post
  • 0
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

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • 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.