MetalES / Project-Zelda

Project Zelda, made using Solarus
12 stars 1 forks source link

game:start_dialog(dialog, varible, function(answer)) no longer working #41

Closed MetalES closed 8 years ago

MetalES commented 8 years ago

function(answer) no longer works after replacing sol.main.load by require, that's strange ...

game:start_dialog("_ocarina."..index..".played", function(answer) if answer == 1 then self:warp_from_ocarina("out") else self:stop_ocarina() end end)

answer always return nil

Strangely, in the dialog box script, selected_answer return the right value

christopho commented 8 years ago

https://github.com/MetalES/Project-Zelda/blob/master/data/scripts/loader/dialog_box.lua#L314

selected_answers is mispelled, it shoud be selected_answer

christopho commented 8 years ago

And ok, mispelled is misspelled, it should be misspelled :)

MetalES commented 8 years ago

Right right, I didn't see the extra letter, thanks Chris :)