~ Forums of Enroth ~
Would you like to react to this message? Create an account in a few clicks or log in to continue.

~ Forums of Enroth ~

The Enroth diehard fan community
 
HomeHome  Latest imagesLatest images  SearchSearch  RegisterRegister  Log inLog in  
Latest topics
» fheroes2 General Announcements
[Ironfist 1.3.0] Bug with the OnTownOpen callback Icon_minitimeby sirDranik 2024-03-17, 23:35

» Photo Gallery
[Ironfist 1.3.0] Bug with the OnTownOpen callback Icon_minitimeby Sir Albe 2024-03-07, 06:57

» Heroes Orchestra's 5th Birthday concerts with Paul Romero
[Ironfist 1.3.0] Bug with the OnTownOpen callback Icon_minitimeby Sir Albe 2024-03-07, 06:55

» Polskie powitanie
[Ironfist 1.3.0] Bug with the OnTownOpen callback Icon_minitimeby rrravyn 2024-03-05, 04:02

» Heroes II localisation: how to make no-CD patch.
[Ironfist 1.3.0] Bug with the OnTownOpen callback Icon_minitimeby kiku 2024-02-19, 02:43

» WARNING - The dreaded moment is here: Heroes 6 servers shutting down
[Ironfist 1.3.0] Bug with the OnTownOpen callback Icon_minitimeby Blake01 2024-02-17, 15:25

» Forum Admins Feed
[Ironfist 1.3.0] Bug with the OnTownOpen callback Icon_minitimeby GodRage 2024-02-15, 22:10

Poll
Global announcements should be:
Everlasting, 1 for each project.
[Ironfist 1.3.0] Bug with the OnTownOpen callback Redbar110%[Ironfist 1.3.0] Bug with the OnTownOpen callback Redbar12
 0% [ 0 ]
Temporary, when there is something new to announce.
[Ironfist 1.3.0] Bug with the OnTownOpen callback Redbar11100%[Ironfist 1.3.0] Bug with the OnTownOpen callback Redbar12
 100% [ 6 ]
Holalala... No idea where the Ultimate artifact is.
[Ironfist 1.3.0] Bug with the OnTownOpen callback Redbar110%[Ironfist 1.3.0] Bug with the OnTownOpen callback Redbar12
 0% [ 0 ]
Total Votes : 6
Most Viewed Topics
H3SW: General Graphics discussion
Ragoon's Graphics For HoMM3SW
Introduce yourself
H3SW General Discussion
H3SW Map List: Work in progress
H3SW: Dwelling Development
Forum Admins Feed
The Floody Land
Enrothian Fan Art
Heroes III: The Succession Wars v0.8.1 Beta

 

 [Ironfist 1.3.0] Bug with the OnTownOpen callback

Go down 
3 posters
AuthorMessage
DarkAtom
Pikeman
Pikeman
DarkAtom


Messages : 47
Quality Points : 6
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
Mage
Mage
Unknown_Hero


Messages : 778
Quality Points : 78
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 : 27
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

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: