On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

playerweapons_init_all inits all the weapon data, normally it's created by the obj_setup (which sets up all the other data as well). Did you remove the blank first room that sets everything up (or change the starting room to a different one)?

global.weapon_data[wid] is probably what's not an array here, try printing it with a show_debug_message within playerweapon_register_new and it should tell you what it is (if it contains 'undefined' or crashes with an 'accessing array out of bounds' error you don't actually add the knife data as expected and then you most likely don't run the init script at all)

It would probably be possible to remove the playerweapons_init_all script entirely (code inside a script file but not inside a function body will be run when the game loads, this can be used to set up global variables earlier than normal and ensure that code is only ran once), the order of execution between different script files isn't guaranteed though so use with care.

(+1)

I'm running things from my own game, so I wasn't aware of that room actually. I'll take a look at that , thanks!