Skocz do zawartości

Rekomendowane odpowiedzi

Hejka, mam okropny problem z questem :/
sysser z ch1:
 

SYSERR: Oct 29 19:19:37 :: RunState: LUA_ERROR: [string "training_sagemaster_skill"]:67: attempt to call field `learn_sage_master_skill' (a nil value)
SYSERR: Oct 29 19:19:37 :: WriteRunningStateToSyserr: LUA_ERROR: quest training_sagemaster_skill.start click

Treść questa:
 

quest training_sagemaster_skill begin
    state start begin
		function BuildSageMasterSkillList(job, group)
			PERFECT_MASTER_SKILL_LEVEL = 40
			SAGE_MASTER_SKILL_LEVEL = 50
			
			local skill_list = special.active_skill_list[job+1][group]
			local ret_vnum_list = {}
			local ret_name_list = {}
			
			table.foreach(skill_list, 
			function(i, skill_vnum) 
			local skill_level = pc.get_skill_level(skill_vnum)
			
			if skill_level >= PERFECT_MASTER_SKILL_LEVEL and skill_level < SAGE_MASTER_SKILL_LEVEL then
				table.insert(ret_vnum_list, skill_vnum)
				local name = locale.GM_SKILL_NAME_DICT[skill_vnum]
				if name == nil then
					name = skill_vnum
				end
				
				table.insert(ret_name_list, name)
			end
			end)
			
			return {ret_vnum_list, ret_name_list}
		end
		
		when 50569.use begin
			say_title(item_name(50569))
			say("")
			if pc.get_skill_group() == 0 then
				say("Vocę ainda năo escolheu uma doutrina.")
				return
			end
			
			if get_time() < pc.getqf("next_time") then
				if not pc.is_skill_book_no_delay() then
					say("Quando concluir um treinamento, vocę deve")
					say("descançar por 5 horas.")
					say("")
					return
				end
			end
			
			local result = training_sagemaster_skill.BuildSageMasterSkillList(pc.get_job(), pc.get_skill_group())
			local vnum_list = result[1]
			local name_list = result[2]
			if table.getn(vnum_list) == 0 then
				say("Ainda năo há skills Perfect Master para")
				say("o treinamento Sage Master.")
				say("")
				return
			end
			
			say("Por favor, escolha uma skill para treinar:")
			say("")
			
			local menu_list = {}
			table.foreach(name_list, function(i, name) table.insert(menu_list, name) end)
			table.insert(menu_list, "Fechar") 
			
			local s=select_table(menu_list)
			if table.getn(menu_list) == s then
				return
			end
			
			local skill_name = name_list[s]
			local skill_vnum = vnum_list[s]
			local skill_level = pc.get_skill_level(skill_vnum)
			local cur_alignment = pc.get_real_alignment()
			local need_alignment = 1000 + 500 * (skill_level - 30)
			
			local title = string.format("%s Perfect Master", skill_name)
			
			say_title(item_name(50569))
			say("")
			say("Ao gastar seus pontos de honra, possivelmente")
			say("vocę poderá se tornar Malfeitor e se morto, pode")
			say("acabar perdendo os itens...")
			say("")
			say("Deseja continuar?")
			say("")
			local s = select("Sim", "Năo")	
			if s == 2 then
				return
			end
			
			if cur_alignment <- 19000+need_alignment then
				say_title(title)
				say("")
				say_reward("Vocę năo tem pontos de honra suficientes")
				say_reward("para upar sua skill P...")
				say("")
				return
			end
			
			if get_time() < pc.getqf("next_time") then
				if pc.is_skill_book_no_delay() then
					pc.remove_skill_book_no_delay()
				else
					return
				end
			end
			
			pc.setqf("next_time", get_time()+60*60*5)
			if pc.learn_sage_master_skill(skill_vnum) then
				say_title(title)
				say("")
				if pc.get_skill_level(skill_vnum) == 50 then
					say(string.format("%s se tornou Sage Master!", skill_name))
				else
					say(string.format("Vocę treinou %s para P%d...", skill_name, skill_level-40+1+1))
				end
				
				say("Meu corpo está cheio de poder! Sinto algo...")
				say_reward("Vocę completou o treinamento com sucesso!")
				say("")
			else
				pc.change_alignment(-number(need_alignment/3, need_alignment/2))
				
				say_title(title)
				say("")
				say_reward("Infelizmente o treinamento falhou!")
				say("")
			end
			
			pc.remove_item(50569, 1)
		end
    end
end

Liczę na pomoc, dzięki z góry ^^

@EDIT
Już wiem w czym może być problem, dokładniej dodając system musiałem edytować questlua_pc.cpp (src servera) w następujący sposób:
 

https://pastebin.com/bdKhLz9U

funkcje, które dodałem znajdują się w 3335. linijce i 1515. linijce.
Przy kompilacji wywala błąd:
 

OBJDIR/questlua_pc.o: In function `quest::pc_learn_sage_master_skill(lua_State*)':
/usr/src/mainline_released/mainline_sg/Srcs/Server/game/src/questlua_pc.cpp:3342: undefined reference to `CHARACTER::LearnSageMasterSkill(unsigned int)'
gmake: *** [../game] Bł±d 1

Ktoś, coś? :/

Edytowane przez _MC0Kuba0MC_

4613f3c2a38d0d10gen.png

Odnośnik do komentarza
  • Ostatnio przeglądający forum Problem z questem   0 użytkowników
    • Brak zarejestrowanych użytkowników przeglądających tę stronę.
×
×
  • Dodaj nową pozycję...