nested==0

Înainte de a posta o problemă, caută în acest forum și poate găsești rezolvare.
Închis
Avatar utilizator
t4zu
Nivel 3

Nivel 3
Mesaje: 476
Membru din: 16 Iul 2015, 21:31
Server: Doar testez
Regat: Chunjo
Aprecieri: 94  
Mulţumiri: 44  
 Contact:
Medalii

*Problemă: nested==0 , desi este totul ok
Tipologie server:
*Resursă folosită:
*ServerFiles utilizat:
*Syserr:
Poză:
*Detalii suplimentare: Mi-am facut un quest, l-am verificat de o multime de ori, iar cand il compilez imi apare in consola:

Cod: Selectaţi tot

QUEST : obj_teleporter_x
STATE : start
WHEN  : 10004.use
OBJ_Teleporter_x.lua:345:assertion failure : nested==0
Abort (core dumped)
Acesta este questul:

Cod: Selectaţi tot

quest obj_teleporter_x begin
	state start begin

		--==========================================================================
		--Teleporter
		--==========================================================================
		when 10004.use begin

			--
			local empirex = pc.get_empire()
			--

			say_title( "Teleporter" )
			say_alb( "" )
			say_alb( "" )
			say_alb( "Selecteaza zona in care doresti sa calatoresti:" )
			say_alb( "" )
			say_alb( "" )
			say_alb( "" )
			say_alb( "" )
			say_alb( "" )
			say_alb( "" )
			say_alb( "" )
			local SelectChoiceZone = select( "Intern" , "Extern" , "- (X) -" )
			--.
			if SelectChoiceZone == 3 then
				return 
			end
			-- ============= --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
			-- INTERN        --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
			-- ============= --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
			if SelectChoiceZone == 1 then
			say_title( "Teleporter - Intern" )
			say_alb( "" )
			local SelectChoiceIntern = select( "Map 1" , "Map 2" , "- (X) -" )
				--.
				if SelectChoiceIntern == 3 then
					return
				end
				--.
				if SelectChoiceIntern == 1 then
				say_title( "Teleporter - Intern" )
				say_auriu( "Map 1" )
				say_alb( "" )
				local SelectChoiceMap1 = select( "Shinsoo   (Rosu)" , "Chunjo   (Galben)" , "Jinno   (Albastru)" , ">> Imperiu <<" , "- (X) -" )
					--.
					if SelectChoiceMap1 == 5 then
						return
					end
					--.
					if SelectChoiceMap1 == 1 then
					say_title( "Teleporter - Intern" )
					say_auriu( "Map 1 --> Shinsoo   (Rosu)" )
					say_alb( "" )
					say_alb( "" )
					say_reward( "Nivel recomandat: 1-18" )
					say_alb( "" )
					say_alb( "" )
					say_alb( "" )
					say_alb( "" )
					say_alb( "" )
					say_alb( "" )
					say_reward( "INFO:  PVM / PVP" )
					say_verde2( "Metin2Quest-Test" )
					local SelectChoiceDN = select( ">>>" , "- (X) -" )
						--.
						if SelectChoiceDN == 2 then
							return
						end
						--.
						if SelectChoiceDN == 1 then
							pc.warp( 474300 , 954800 ) --Shinsoo   (Rosu)
						end
						--.
					end
					--.
					if SelectChoiceMap1 == 2 then
					say_title( "Teleporter - Intern" )
					say_auriu( "Map 1 --> Chunjo   (Galben)" )
					say_alb( "" )
					say_alb( "" )
					say_reward( "Nivel recomandat: 1-18" )
					say_alb( "" )
					say_alb( "" )
					say_alb( "" )
					say_alb( "" )
					say_alb( "" )
					say_alb( "" )
					say_reward( "INFO:  PVM / PVP" )
					say_verde2( "Metin2Quest-Test" )
					local SelectChoiceDN = select( ">>>" , "- (X) -" )
						--.
						if SelectChoiceDN == 2 then
							return
						end
						--.
						if SelectChoiceDN == 1 then
							pc.warp( 55700 , 157900 ) --Chunjo   (Galben)
						end
						--.
					end
					--.
					if SelectChoiceMap1 == 3 then
					say_title( "Teleporter - Intern" )
					say_auriu( "Map 1 --> Jinno   (Albastru)" )
					say_alb( "" )
					say_alb( "" )
					say_reward( "Nivel recomandat: 1-18" )
					say_alb( "" )
					say_alb( "" )
					say_alb( "" )
					say_alb( "" )
					say_alb( "" )
					say_alb( "" )
					say_reward( "INFO:  PVM / PVP" )
					say_verde2( "Metin2Quest-Test" )
					local SelectChoiceDN = select( ">>>" , "- (X) -" )
						--.
						if SelectChoiceDN == 2 then
							return
						end
						--.
						if SelectChoiceDN == 1 then
							pc.warp( 959900 , 269200 ) --Jinno   (Albastru)
						end
						--.
					end
					--.
					if SelectChoiceMap1 == 4 then
						--.
						if empirex == 1 then
							pc.warp( 474300 ,954800 ) --Shinsoo   (Rosu)
						return
						--.
						elseif empirex == 2 then
							pc.warp( 55700 , 157900 ) --Chunjo   (Galben)
						return
						--.
						elseif empirex == 3 then
							pc.warp( 959900 , 269200 ) --Jinno   (Albastru)
						end
						--.
					end
					--.
				if SelectChoiceIntern == 2 then
				say_title( "Teleporter - Intern" )
				say_auriu( "Map 2" )
				say_alb( "" )
				local SelectChoiceMap2 = select( "Shinsoo   (Rosu)" , "Chunjo   (Galben)" , "Jinno   (Albastru)" , ">> Imperiu <<" , "- (X) -" )
					--.
					if SelectChoiceMap2 == 5 then
						return
					end
					--.
					if SelectChoiceMap2 == 1 then
					say_title( "Teleporter - Intern" )
					say_auriu( "Map 2 --> Shinsoo   (Rosu)" )
					say_alb( "" )
					say_alb( "" )
					say_reward( "Nivel recomandat: 19-32" )
					say_alb( "" )
					say_alb( "" )
					say_alb( "" )
					say_alb( "" )
					say_alb( "" )
					say_alb( "" )
					say_reward( "INFO:  PVM / PVP" )
					say_verde2( "Metin2Quest-Test" )
					local SelectChoiceDN = select( ">>>" , "- (X) -" )
						--.
						if SelectChoiceDN == 2 then
							return
						end
						--.
						if SelectChoiceDN == 1 then
							pc.warp( 353100 , 882900 ) --Shinsoo II   (Rosu)
						end
						--.
					end
					--.
					if SelectChoiceMap1 == 2 then
					say_title( "Teleporter - Intern" )
					say_auriu( "Map 2 --> Chunjo   (Galben)" )
					say_alb( "" )
					say_alb( "" )
					say_reward( "Nivel recomandat: 19-32" )
					say_alb( "" )
					say_alb( "" )
					say_alb( "" )
					say_alb( "" )
					say_alb( "" )
					say_alb( "" )
					say_reward( "INFO:  PVM / PVP" )
					say_verde2( "Metin2Quest-Test" )
					local SelectChoiceDN = select( ">>>" , "- (X) -" )
						--.
						if SelectChoiceDN == 2 then
							return
						end
						--.
						if SelectChoiceDN == 1 then
							pc.warp( 353100 , 882900 ) --Chunjo II  (Galben)
						end
						--.
					end
					--.
					if SelectChoiceMap1 == 3 then
					say_title( "Teleporter - Intern" )
					say_auriu( "Map 2 --> Jinno   (Albastru)" )
					say_alb( "" )
					say_alb( "" )
					say_reward( "Nivel recomandat: 19-32" )
					say_alb( "" )
					say_alb( "" )
					say_alb( "Recommended level: 19-32" )
					say_alb( "" )
					say_alb( "" )
					say_alb( "" )
					say_reward( "INFO:  PVM / PVP" )
					say_verde2( "Metin2Quest-Test" )
					local SelectChoiceDN = select( ">>>" , "- (X) -" )
						--.
						if SelectChoiceDN == 2 then
							return
						end
						--.
						if SelectChoiceDN == 1 then
							pc.warp( 863900 , 246000 ) --Jinno II   (Albastru)
						end
						--.
					end
					--.
					if SelectChoiceMap1 == 4 then
						--.
						if empirex == 1 then
							pc.warp( 353100 , 882900 ) --Shinsoo II   (Rosu)
						return
						--.
						elseif empirex == 2 then
							pc.warp( 353100 , 882900 ) --Chunjo II   (Galben)
						return
						--.
						elseif empirex == 3 then
							pc.warp( 863900 , 246000 ) --Jinno II   (Albastru)
						end
						--.
					end
					--.
				end
				--.
			end
			-- ============= --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
			-- EXTERN        --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
			-- ============= --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
			if SelectChoiceZone == 2 then
			say_title( "Teleporter - Extern" )
			say_alb( "" )
			local SelectChoiceExtern = select( "Valea Seungryong" , "Desertul Yongbi" , "Muntele Sohan" , "Taramul Doyumhwan" , "Zona Lungsam" , "Padurea rosie" , "Templul Hwang" , "Turnul Demonilor" , "V0" , "V1" , "V2" , "Vizuina Reginei" , "Grota exilului 1" , "Grota exilului 2" , "Catacomba Diavolului" , "Zona speciala" , "- (X) -" )
				--.
				if SelectChoiceExtern == 17 then
					return
				end
				--.
				if SelectChoiceExtern == 1 or SelectChoiceExtern == 2 or SelectChoiceExtern == 3 or SelectChoiceExtern == 4 or SelectChoiceExtern == 5 or SelectChoiceExtern == 6 or SelectChoiceExtern == 7 or SelectChoiceExtern == 8 or SelectChoiceExtern == 9 or SelectChoiceExtern == 10 or SelectChoiceExtern == 11 or SelectChoiceExtern == 12 or SelectChoiceExtern == 13 or SelectChoiceExtern == 14 or SelectChoiceExtern == 15 or SelectChoiceExtern == 16 then
				say_title( "Teleporter - Extern" )
				say_auriu( "Valea Seungryong" )
				say_alb( "" )
				say_galben( "(Ro)" )
				say_alb( "" )
				say_alb( "" )
				say_alb( "" )
				say_alb( "" )
				say_alb( "" )
				say_alb( "" )
				say_alb( "" )
				say_reward( "INFO:  PVM / PVP" )
				say_verde2( "Metin2Quest-Test" )
				local SelectChoiceDN = select( ">>>" , "- (X) -" )
					--.
					if SelectChoiceDN == 2 then
						return
					end
					--.
					if SelectChoiceDN == 1 then
					local SelectChoicePlasare = select( ">> Imperiu <<" , "Shinsoo   (Rosu)" , "Chunjo   (Galben)" , "Jinno   (Albastru)" , "- (X) -" )
						--.
						if SelectChoicePlasare == 5 then
							return
						end
						--.
						if SelectChoicePlasare == 1 then
							--.
							if empirex == 1 then
								pc.warp( 402100 , 673900 ) --Shinsoo   (Rosu)
							return
							--.
							elseif empirex == 2 then
								pc.warp( 270400 , 739900 ) --Chunjo   (Galben)
							return
							--.
							elseif empirex == 3 then
								pc.warp( 321300 , 808000 ) --Jinno   (Albastru)
							end
							--.
						end
						--.
						if SelectChoicePlasare == 2 then
						say_title( "Teleporter - Extern" )
						say_item_vnum( 10005 ) --T complex
						say_alb( "" )
						say_rosu( "Coordonatele sunt neclare in aceasta harta. Am nevoie de" )
						say_rosu( "o '"..item_name( 10005 ).."', pentru a calatorii aici." ) --T complex
						say_alb( "" )
						say_alb( "" )
						say_alb( "" )
						say_alb( "" )
						say_alb( "" )
						say_reward( "INFO:  (NPC) Biolog" )
						say_verde2( "Metin2Quest-Test" )
						end
						--.
					end
					--.
				--if SelectChoiceExtern == 2 ...
				--------------------------------
				end
				--.
			end
			--.
		end
		--.

	end
end
Stie cineva de ce, sau a gasit problema? Eu inca ma mai uit la el si nu gasesc nimic, imi pare totul ok :(
Avatar utilizator
Athero
Ţepar / Untrusted User

Ţepar / Untrusted User
Mesaje: 3936
Membru din: 17 Aug 2017, 00:08
Aprecieri: 559  
Mulţumiri: 7142  
Discord: Copiază ID
Medalii

Cod: Selectaţi tot

nested==0
Mai adauga un end la final.
Pentru acest mesaj, Athero for the post:
t4zu
//retras
Afișează semnătura
Avatar utilizator
t4zu
Nivel 3

Nivel 3
Mesaje: 476
Membru din: 16 Iul 2015, 21:31
Server: Doar testez
Regat: Chunjo
Aprecieri: 94  
Mulţumiri: 44  
 Contact:
Medalii

Nezuko scrie: ↑16 Oct 2019, 20:08

Cod: Selectaţi tot

nested==0
Mai adauga un end la final.
Ciudat, functioneaza. Mersi!
Apropo, exista o functie care nu s-a inchis daca mai trebuie sa adaug acel "end", daca da, te uiti si tu sa imi spui te rog, eu nu o vad si vreau sa il fac mai complex?
Mersi!
Avatar utilizator
Athero
Ţepar / Untrusted User

Ţepar / Untrusted User
Mesaje: 3936
Membru din: 17 Aug 2017, 00:08
Aprecieri: 559  
Mulţumiri: 7142  
Discord: Copiază ID
Medalii

t4zu scrie: ↑16 Oct 2019, 20:11
Nezuko scrie: ↑16 Oct 2019, 20:08

Cod: Selectaţi tot

nested==0
Mai adauga un end la final.
Ciudat, functioneaza. Mersi!
Apropo, exista o functie care nu s-a inchis daca mai trebuie sa adaug acel "end", daca da, te uiti si tu sa imi spui te rog, eu nu o vad si vreau sa il fac mai complex?
Mersi!
Nu exista, erorile de genul apar cand nu ai pus suficiente inchideri. Gen ai ratat un end sau cand apare eraore de QUEST, automat ai pus prea multe inchideri si trebuie sa mai stergi din ele.
//retras
Afișează semnătura
Avatar utilizator
t4zu
Nivel 3

Nivel 3
Mesaje: 476
Membru din: 16 Iul 2015, 21:31
Server: Doar testez
Regat: Chunjo
Aprecieri: 94  
Mulţumiri: 44  
 Contact:
Medalii

Nezuko scrie: ↑16 Oct 2019, 20:13
t4zu scrie: ↑16 Oct 2019, 20:11
Nezuko scrie: ↑16 Oct 2019, 20:08

Cod: Selectaţi tot

nested==0
Mai adauga un end la final.
Ciudat, functioneaza. Mersi!
Apropo, exista o functie care nu s-a inchis daca mai trebuie sa adaug acel "end", daca da, te uiti si tu sa imi spui te rog, eu nu o vad si vreau sa il fac mai complex?
Mersi!
Nu exista, erorile de genul apar cand nu ai pus suficiente inchideri. Gen ai ratat un end sau cand apare eraore de QUEST, automat ai pus prea multe inchideri si trebuie sa mai stergi din ele.
O mica problema. Questul se compileaza fara probleme, dar nu functioneaza. (PS. Partea de item_proto e ok). Oare ai habar de ce? Syserr e gol, atat server cat si client :(
Avatar utilizator
[RaffaeL]
Software Developer

Software Developer
Mesaje: 3223
Membru din: 19 Mar 2016, 12:58
Server: ...
Aprecieri: 15  
Mulţumiri: 2502  
  Rezolvări prob.: 2
Discord: Copiază ID
 Contact:
Medalii

t4zu scrie: ↑16 Oct 2019, 20:11
Nezuko scrie: ↑16 Oct 2019, 20:08

Cod: Selectaţi tot

nested==0
Mai adauga un end la final.
Ciudat, functioneaza. Mersi!
Apropo, exista o functie care nu s-a inchis daca mai trebuie sa adaug acel "end", daca da, te uiti si tu sa imi spui te rog, eu nu o vad si vreau sa il fac mai complex?
Mersi!
if SelectChoiceIntern == 1 then nu se inchide cu end in questul original. De acolo eroarea nested==0.
Pentru acest mesaj, [RaffaeL] for the post:
t4zu
Imagine
Imagine
https://www.youtube.com/watch?v=GhYkCIETEto
Do everything, if you know what you're doing, else... Imagine
Ma gasesti si aici: Discord https://discord.gg/5J5GnyZVSR
Afișează semnătura
Avatar utilizator
t4zu
Nivel 3

Nivel 3
Mesaje: 476
Membru din: 16 Iul 2015, 21:31
Server: Doar testez
Regat: Chunjo
Aprecieri: 94  
Mulţumiri: 44  
 Contact:
Medalii

[RaffaeL] scrie: ↑16 Oct 2019, 20:23
t4zu scrie: ↑16 Oct 2019, 20:11
Nezuko scrie: ↑16 Oct 2019, 20:08

Cod: Selectaţi tot

nested==0
Mai adauga un end la final.
Ciudat, functioneaza. Mersi!
Apropo, exista o functie care nu s-a inchis daca mai trebuie sa adaug acel "end", daca da, te uiti si tu sa imi spui te rog, eu nu o vad si vreau sa il fac mai complex?
Mersi!
if SelectChoiceIntern == 1 then nu se inchide cu end in questul original. De acolo eroarea nested==0.
Wow, frate, ce spirit de observatie. Mersi! Ai dreptate :O
EDIT: Acum este totul ok, dar sunt in dilema. Nu funtioneaza item-ul respectiv. :|
Oare sa fie din cauza la "Flag", din item_proto (txt), care este: "QUEST_USE_MULTIPLE" ?
Avatar utilizator
[RaffaeL]
Software Developer

Software Developer
Mesaje: 3223
Membru din: 19 Mar 2016, 12:58
Server: ...
Aprecieri: 15  
Mulţumiri: 2502  
  Rezolvări prob.: 2
Discord: Copiază ID
 Contact:
Medalii

pune ITEM_QUEST ca type.
Imagine
Imagine
https://www.youtube.com/watch?v=GhYkCIETEto
Do everything, if you know what you're doing, else... Imagine
Ma gasesti si aici: Discord https://discord.gg/5J5GnyZVSR
Afișează semnătura
Avatar utilizator
t4zu
Nivel 3

Nivel 3
Mesaje: 476
Membru din: 16 Iul 2015, 21:31
Server: Doar testez
Regat: Chunjo
Aprecieri: 94  
Mulţumiri: 44  
 Contact:
Medalii

[RaffaeL] scrie: ↑16 Oct 2019, 20:39 pune ITEM_QUEST ca type.
Asa am pus, acum incerc mai multe variante, sa vedem, am pus la flag: "NONE", si la antiflag: "ANTI_STACK".

Edit, conform celor spuse mai sus cu un rand, functioneaza.
Multumesc tuturor pentru ajutor! Sa aveti o seara frumoasa! ;)
Avatar utilizator
Ley
Nivel 9

Nivel 9
Mesaje: 1934
Membru din: 09 Feb 2017, 22:30
Server: Colossus2
Regat: Jinno
Aprecieri: 221  
Mulţumiri: 1338  
Medalii

Problemă rezolvată.
Imagine
Afișează semnătura
Închis

Înapoi la “Probleme rezolvate”

  • Informaţie
  • Cine este conectat

    Utilizatori ce ce navighează pe acest forum: Bing [Bot] și 16 vizitatori