Elise39u / LaravelAvontuur

A remade of my kilk game in larvael
0 stars 0 forks source link

Ajax Call Else #9

Closed Elise39u closed 6 years ago

Elise39u commented 6 years ago

Now it seems that the call to the server to see if the user is allowed to talk a npc isn`t working 100% The issue is that the code never comes at the else


success: function (result) {
            if (result.Status == 'Unknown') {
                alert("UNKNOWN DETECTED")
                NotAllowed = false;
                Allowed = true;
            } else {
                alert("ACTIVE DETECTED")
                $("#opener-2").hide();
                NotAllowed = true;
                Allowed = false;
            }
        }
``` This makes it so that that the user always can talk to a npc
Elise39u commented 6 years ago

The issue has been solved due to debugging i checked the function with outcome with a var_dump but this was for the json_code so the apllication has no idea that status was been put