~ Forums of Enroth ~

An Enroth diehard fan community
 
HomeHome  ChatChat  FAQFAQ  SearchSearch  RegisterRegister  Log inLog in  
Latest topics
» Paul Romero - Russian Tour September 2018
by Sir Albe 2018-08-19, 04:51

» Changes to the game's graphics
by Unknown_Hero 2018-08-12, 04:53

» Happy Birthdays and Congrats!
by Dr Slash 2018-08-09, 08:03

» The YouTube thread
by GodRage 2018-08-09, 03:57

» Photo Gallery
by GodRage 2018-08-09, 03:50

» Хочу сделать коллаж по любимой игре
by Stryker34RUS 2018-08-05, 20:08

» Heroes 2/4 multiplayer - looking for friiends/opponents for game
by Orzie 2018-08-05, 07:02

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
Commanders?
Enrothian Fan Art
Welcome fellow Enrothians!
Dervish Faction General Concept
Heroes of Might and Magic 3: The Succession Wars - General info & Announcements

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
 
[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: