~ Forums of Enroth ~

An Enroth diehard fan community
 
HomeHome  FAQFAQ  SearchSearch  RegisterRegister  Log inLog in  
Latest topics
» Ragoon's Graphics For HoMM3SW
[Ironfist 1.3.0] Bug with the OnTownOpen callback Icon_minitimeby buffkaz 2019-04-15, 03:58

» feedback on playing vs myself
[Ironfist 1.3.0] Bug with the OnTownOpen callback Icon_minitimeby YhyJasne 2019-04-13, 20:55

» H3SW General Discussion
[Ironfist 1.3.0] Bug with the OnTownOpen callback Icon_minitimeby frog-sized-frog 2019-04-11, 22:50

» H3SW: Artifact system
[Ironfist 1.3.0] Bug with the OnTownOpen callback Icon_minitimeby Orzie 2019-04-09, 05:15

» Mugaisa, the elusive Knight
[Ironfist 1.3.0] Bug with the OnTownOpen callback Icon_minitimeby Orzie 2019-04-09, 05:06

» Introduce yourself
[Ironfist 1.3.0] Bug with the OnTownOpen callback Icon_minitimeby Orzie 2019-04-09, 04:56

» Is H3:SW 0.8 stable without using HD mod
[Ironfist 1.3.0] Bug with the OnTownOpen callback Icon_minitimeby Orzie 2019-04-09, 04:33

Poll
"Wait" in HoMM2?
Yes
[Ironfist 1.3.0] Bug with the OnTownOpen callback Redbar1180%[Ironfist 1.3.0] Bug with the OnTownOpen callback Redbar12
 80% [ 55 ]
No
[Ironfist 1.3.0] Bug with the OnTownOpen callback Redbar1120%[Ironfist 1.3.0] Bug with the OnTownOpen callback Redbar12
 20% [ 14 ]
Total Votes : 69
Most Viewed Topics
H3SW: General Graphics discussion
Ragoon's Graphics For HoMM3SW
H3SW General Discussion
H3SW: Dwelling Development
Heroes of Might and Magic 3: The Succession Wars - General info & Announcements
H3SW Map List: Work in progress
Welcome fellow Enrothians!
Enrothian Fan Art
Commanders?
H3SW Recruitment Point - Enroth Needs You!

Share
 

 [Ironfist 1.3.0] Bug with the OnTownOpen callback

Go down 
AuthorMessage
DarkAtom
Pikeman
Pikeman
DarkAtom

Messages : 32
Quality Points : 2
Registration Date : 2018-02-27

[Ironfist 1.3.0] Bug with the OnTownOpen callback Empty
PostSubject: [Ironfist 1.3.0] Bug with the OnTownOpen callback   [Ironfist 1.3.0] Bug with the OnTownOpen callback Icon_minitime2018-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
Back to top Go down
Unknown_Hero
Vampire
Vampire
Unknown_Hero

Messages : 459
Quality Points : 58
Registration Date : 2015-09-06

[Ironfist 1.3.0] Bug with the OnTownOpen callback Empty
PostSubject: Re: [Ironfist 1.3.0] Bug with the OnTownOpen callback   [Ironfist 1.3.0] Bug with the OnTownOpen callback Icon_minitime2018-09-05, 05:04

Well found, I hope a correction soon. Smile
Back to top Go down
XT3RM1N8R
Gargoyle
Gargoyle
XT3RM1N8R

Messages : 23
Quality Points : 1
Registration Date : 2016-11-06
Age : 22
Location : USA

[Ironfist 1.3.0] Bug with the OnTownOpen callback Empty
PostSubject: Debugging   [Ironfist 1.3.0] Bug with the OnTownOpen callback Icon_minitime2018-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
Back to top Go down
Sponsored content




[Ironfist 1.3.0] Bug with the OnTownOpen callback Empty
PostSubject: Re: [Ironfist 1.3.0] Bug with the OnTownOpen callback   [Ironfist 1.3.0] Bug with the OnTownOpen callback Icon_minitime

Back to top Go down
 
[Ironfist 1.3.0] Bug with the OnTownOpen callback
Back to top 
Page 1 of 1
 Similar topics
-
» [Ironfist ver 1.2] scrXXXX.tmp files
» Some Ironfist changes I am working on

Permissions in this forum:You cannot reply to topics in this forum
~ Forums of Enroth ~ :: Modding Guild :: Heroes of Might and Magic II: Project Ironfist :: Bug Reports-
Jump to: