I execute an SQL query using DarkRP’s SQL (Which is the MySQLite.blahblah bit) functions and I need it to detect if the user has set a pin or not. If the user has not set a pin (meaning, the pin is equal to NULL) then show up a menu to set one.
I have the SQL query fetching the pin just fine and if its blank I can do print(data) and it just returns NULL like it should. Trouble is if I try to do the if statement with the data to detect if its NULL or not and it just returns that its not null in any case wether the variable is null or not.
MySQLite.queryValue("SELECT pin FROM chiz_test WHERE unique_id='".. act:UniqueID() .."'", function(data) if data then umsg.Start("loginPass", act) umsg.End() else umsg.Start("setPass", act) umsg.End() end end)