Problems with dialog and HUD

Started by Starlock, September 05, 2015, 02:44:21 AM

Previous topic - Next topic
I'm not entirely sure because I'll try to make small edits and the errors wont show up but the screen is still black :/ Errors keep appearing and disappearing

This is the only current error I'm getting Error: In timer callback: [string "scripts/menus/title.lua"]:27: attempt to index local 'zs_presents_img' (a nil value)

Code ( lua) Select
  local zs_presents_img =
      sol.surface.create("title_screen_initialization.png", true)
       

Isn't this the right code used to call zs_presents?

If zs_presents_img is nil, it means that the file could not be loaded. Does it exists? The "true" parameter means to load a language-specific image, so it should exist in the folder languages/xx/images of your quest. Where xx is the current language. There should be a current language.

September 09, 2015, 12:19:28 AM #17 Last Edit: September 09, 2015, 12:27:28 AM by froggy77
In game_manager.lua, I would replace

Code ( lua) Select
  -- Function called when the player goes to another map.
   game.on_map_changed = function(game, map)
     
  -- Notify the HUD (some HUD elements need to know that).
hud:on_map_changed(map)
   end


by this:

Code ( lua) Select
  -- Function called when the player goes to another map.
   function game:on_map_changed(map)
     
  -- Notify the HUD (some HUD elements need to know that).
hud:on_map_changed(map)
   end

Ok the title menu and savegames are now working nicely so I got   

Error: In on_started: [string "scripts/game_manager.lua"]:18: attempt to call method 'initialize_hud' (a nil value)

(Which might have been there to begin with but I only noticed the map changed one.   :P  )