Community Forum

Error attempt to index field 'ingameMap' (a nil value)

Forum Overview >> Scripting

Created25.12.2018 12:17

Baptiste Brossette (Monsieur_Bab) 25.12.2018 12:17
I don't understand where my code is wrong :(
I would like to desactivate the visibility of the mini-map when I press a specific key.

function MiniMap:keyEvent(unicode, sym, modifier, isDown)
if Input.isKeyPressed(Input.KEY_equals) then

The error : attempt to index field 'ingameMap' (a nil value)

The LUA doc says we need to specify one of 3 states (
I wrote the component and the function with arguments, but it doesn't work :/

Thanks in advance for your response


Espen K. (estyx) 26.12.2018 21:54
If you haven't figured out yet, it's because you have a lower case 'i' in 'IngameMap' :)

Jos Kuijpers (Unknown) 02.01.2019 15:57
HUD -> g_currentMission.hud

Note: Log in to post. Create a new account here.