Jump to content

if() not working (please help) :(


AHSS

Recommended Posts

this is so annoying i dont get errors and its not working

what iam trying to do is this

function Save() 
local logged = getElementData(source, "logged") 
if(logged == "true") then 
--code 
end 
  

and i did this

function log(theplayer, command, password) 
--code 
setElementData(theplayer, "logged", "true") 
end 
  

and it doesnt work it doesnt do the function Save

i tried it with same code but another IF() (not using any element data)

i just checked if a file exist

like this

  
local pfile = xmlLoadFile(--file) 
if(pfile) then 
--same code in Save function without any change 
end 
  

and it worked so i know the problem is with IF()

know that i did this

function log(theplayer, command, password) 
local logged = getElementData(theplayer, "logged") 
if(logged == "false") 
--code 
else 
 outputChatBox("you are already logged in") 
end 
  

and the check goes correctly if i do log twice second time tells me that iam already logged in

please help what am i doing wrong :(

please help thanks

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...