~ Forums of Enroth ~

An Enroth diehard fan community
 
HomeHome  ChatChat  FAQFAQ  SearchSearch  RegisterRegister  Log inLog in  
Latest topics
» [Ironfist ver 1.3.0+] Bug with fonction OnLocationVisit(type, x, y)
by Unknown_Hero Yesterday at 23:49

» [Ironfist ver 1.3.0+] Unexpected program termination when a double click is performed on a town
by Unknown_Hero Yesterday at 23:46

» [Ironfist ver 1.3.0+] Pixel of blue color visible during fade to black when launching a scenario
by Unknown_Hero Yesterday at 23:43

» [Ironfist ver 1.3.0+] The bass.dll file is missing after installation
by Unknown_Hero Yesterday at 23:40

» [Ironfist ver 1.3.0] Bug in lua scripts with IDs "CREATURE_PEASANT" or "0"
by Unknown_Hero Yesterday at 23:35

» Let's talk about Wizards
by Orzie Yesterday at 05:23

» [Ironfist ver 1.3.0] Lua script, instructions validation problem
by Unknown_Hero 2018-10-13, 23:19

Poll
"Wait" in HoMM2?
Yes
80%
 80% [ 55 ]
No
20%
 20% [ 14 ]
Total Votes : 69
Most Viewed Topics
H3SW: General Graphics discussion
Ragoon's Graphics For HoMM3SW
H3SW General Discussion
H3SW: Dwelling Development
H3SW Map List: Work in progress
Welcome fellow Enrothians!
Enrothian Fan Art
Commanders?
Heroes of Might and Magic 3: The Succession Wars - General info & Announcements
Dervish Faction General Concept

Share | 
 

 [Ironfist 1.3.0] Bug with the OnTownOpen callback

Go down 
AuthorMessage
DarkAtom
Skeleton
Skeleton
avatar

Messages : 9
Quality Points : 1
Registration Date : 2018-02-27

PostSubject: [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
Back to top Go down
Unknown_Hero
Minotaur
Minotaur
avatar

Messages : 397
Quality Points : 56
Registration Date : 2015-09-06

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

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

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

PostSubject: 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
Back to top Go down
Sponsored content




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

Back to top Go down
 
[Ironfist 1.3.0] Bug with the OnTownOpen callback
Back to top 
Page 1 of 1
 Similar topics
-
» ironfist - problème avec Avast DRep
» [Ironfist ver 1.2] scrXXXX.tmp files
» Some Ironfist changes I am working on
» [Ironfist ver 1.2] Crash with AUTOSAVE
» Virus detected into Ironfist..??

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: