A quick question about radar system

Things that could be happening:

  • M.new() called before M.createLevel()
  • M.new() called after deleting the hud
  • You may have incorrectly modified the module.

Try this:

function M.createLevel(radarGroup, group, numOfAsteroids)
local masterM = require “levels-management.moduleaccessor”

local player = masterM.ship.new(group)
masterM.asteroids.new(group, numOfAsteroids)
masterM.enemyHUD.create(radarGroup, nil, nil, 45, display.contentHeight * 1.5)

local hud = masterM.enemyHUD.getHUD()
print(">>>>>>>>>>>>>>>>>>>HUD = ", hud)
end

return M

Then look in the console to see what the message says

 

Other than that, you need to add more messages to your code to debug what is going on,

 

-OR-

 

You need to get someone (a mentor?) to help you hands on with your whole project. 

 

It is hard to get a complete view of what you’re doing from just the code you posted.

Is this a transcript of an email or a PM?

Also, I can’t find the actual question here.

BTW, the way those green bits are phrased seem familiar. :slight_smile:

Please add a question to this post and we’ll see if someone has an answer. 

I knew this seemed familiar: https://forums.coronalabs.com/topic/70741-how-would-you-make-a-radar-system/

Please link back to prior posts if you’re quoting them.   :)

This isn’t _ sdktester15 _ is it?

Is this a transcript of an email or a PM?

Also, I can’t find the actual question here.

BTW, the way those green bits are phrased seem familiar. :slight_smile:

Please add a question to this post and we’ll see if someone has an answer. 

I knew this seemed familiar: https://forums.coronalabs.com/topic/70741-how-would-you-make-a-radar-system/

Please link back to prior posts if you’re quoting them.   :)

This isn’t _ sdktester15 _ is it?