Subject: [Ironfist 1.3.0] Bug with the OnTownOpen callback 2018-07-19, 21:56
The syntax OnTownOpen(name) doesn't provide anything in variable 'name'. In fact, the function works fine even without the argument. The problem appears when you want to execute only in a specific town (and that's why bringing the Mage's Ring of Power to Sorrow's End doesn't do anything).
So:
Code:
function OnTownOpen(name) if name == "Sorrow's End" then MessageBox("Hello"); end; end; --This will not show anything
Code:
function OnTownOpen() t = GetCurrentTown(); if GetTownName(t) == "Sorrow's End" then MessageBox("Hello"); end; end; --This will show "Hello" (without the quotes) when you enter the town screen of Sorrow's End
Subject: Re: [Ironfist 1.3.0] Bug with the OnTownOpen callback 2018-09-05, 05:04
Well found, I hope a correction soon.
XT3RM1N8R Gargoyle
Messages : 23 Quality Points : 1 Registration Date : 2016-11-06 Age : 27 Location : USA
Subject: Debugging 2018-09-05, 08:00
It looks like the callback for that event is pushing data in a format different than the expected string name. The issue is being investigated at this time.
________________________ Lazy Signature
Sponsored content
Subject: Re: [Ironfist 1.3.0] Bug with the OnTownOpen callback