Help with script!
I'm doing a script in which a hero is in a prison and he has to pay to get out. So when he steps on region prison, it calls the function prison_escape to asks him if he pays or not, and if he does, he gets teleported.
Problem is the script doesnt work. In the console, it says "empty message text!". I don't understand why because my message texts are not empty. I checked the path and it seems fine. I suspect some little detail hidden somewhere that escapes me...
Here's the function :
GoldBribe = herolevel*100;
CurrentGold = GetPlayerResource(1, 6);
GoldEnd = CurrentGold - GoldBribe;
if GetPlayerResource(1, 6) >= GoldBribe*100 then
QuestionBox("Maps/SingleMissions/Xentar/prisonquestion.txt", "onOK", "onCancel");
SetPlayerResource(1, 6, GoldEnd);
And here's the trigger :