Hi Guys, can u tell me what is wrong with this quest?
I receive this error:
Help me :) and Thanks
I receive this error:
And Here is the Quest:Quote:
qc in malloc(): error: allocation failed
Abort (core dumped)
Code:
quest horse_buy begin
state start begin
when 20349."Comprar Cavalo" with horse.get_grade()==0 begin
if pc.level<=4 then
say_title("Comprar Cavalo")
say("Precisas de ser um pouco experiente no reino")
say("para poderes comprar um cavalo")
say("")
say_reward("Precisas de LV:5")
say("")
elseif pc.level>=4 then
say_title("Comprar Cavalo")
say("")
say("Possuis alguma experiencia!")
say("Queres comprar um cavalo?")
say("Armado: 10K | Militar: 500K")
say("")
local b=select("Cavalo Armado" , "Cavalo Militar", "Fechar")
if 1==b then
if pc.money>=10000 then
horse.set_level("11")
pc.chagemoney(-10000)
pc.giveitem(50052, 1)
say_title("Comprar Cavalo")
say("Ai tens o teu cavalo armado!")
say("Trata bem dele.")
say("")
else
if pc.money<10000 then
say_title("Comprar Cavalo")
say("Nao tens dinheiro suficiente")
say("")
say_reward("Precisas de 10K")
say("")
end
elseif 2==b then
if pc.money>=500000 then
horse.set_level("21")
pc.chagemoney(-500000)
pc.giveitem(50053, 1)
say_title("Comprar Cavalo")
say("Ai tens o teu cavalo militar!")
say("Trata bem dele.")
say("")
else
if pc.money<500000 then
say_title("Comprar Cavalo")
say("Nao tens dinheiro suficiente")
say("")
say_reward("Precisas de 500K")
say("")
end
end
end
end