[HELP] ply:GetNWBool( "something" ) == false doesn't work?

pretty much as the title says

[LUA]
if ply:GetNWBool(“something”) == false then
–code–
end
[/LUA]

but if I print the ply:GetNWBool(“something”) it shows false
but the code is not showing up.
and I do not have errors in the code.

Can you post actual code?

[LUA]
function char_menu_check(ply, n)
if ply:GetNWBool( “GetPlayerCharacter”,false ) then
OpenCharMenu()
else
CharAlreadyMade()
end
end
[/LUA]

It just skips the first one goes straight to else statement and if I make it an elseif it skips both.

[editline]24th November 2016[/editline]

oops wrong thing

[editline]24th November 2016[/editline]

[LUA]
function player_menu_check(ply, n)
if ply:GetNWBool( “Istheplayer” ) == false then
OpenPlayerMenu()
else
OpenPickTeam()
end
end
[/LUA]

Did you set the NW bool to false? If it is nil, then the condition fails.

like I said it prints as false

Maybe it prints false on the client but not on the server, or the other way around (less likely).

I dont know why did you do first == false and then ,false)
Do you want to check if this is false or set the default as false
Although im pretty sure that the issue its inside that function not doing nothing

use !ply:GetNWBool( “something”, false )

same on both

[editline]24th November 2016[/editline]

didn’t work

[editline]24th November 2016[/editline]

The function works I’ve tested with concommands and I have opened it with netmessages directly also

print !ply:GetNWBool(“Istheplayer”,false)

always prints as false even when Bool is true

[editline]24th November 2016[/editline]

I mean Bool is false srry

you’re not changing the value then :v
If you would tried that, that would print true, because !false= true
Stop wasting our time

I guess it has to set everytime a player joins the server so I guess I’ll make a function if false then set false or something because otherwise it glitches for some reason