Strange event while click on entity

Hello, when i click on an entity type set as ‘item’ this script is fired:

if (targType ==='item') {
    //pickup item and add to inventory
    if (distance < this.walkAnimCutoff) {
        //disable 3d object
        //var inve = app.root.findByName('Root').script.dbase.targDB;
        if (targDB==='weapons') {
            for (var i=0;i<this.weapons.length;i++) {
                if(targName===this.weapons[i].name) {

and after that the player start fall through the ground but i don’t have any error…any idea?

sorry solution came up yesterday while driving on autoroute, just need to add targType="";