Jump to content

Question about namespaces and console commands

Recommended Posts

"Hello World"-Modder here. So im playing around with the DST API, trying to make myself a home. I dont understand why the following code throws an exception(attem to call a global):



TheInput:AddKeyDownHandler(GLOBAL.KEY_P, function()	DebugSpawn("ash") end)

Using DebugSpawn or c_spawn from within the console just works, so I guess I'm not in the right namespace. How will I make generic console commands available to a selfwritten mod? Sorry if this is noobish, I swear I searched the forums but didnt find/understand something of relevance.


Edit: Thanks for the help guys :)

Edited by Micha
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...