Jump to content

Problem with "return"


rE5vK8bu

Recommended Posts

Posted

That's right?

if getAccountData(account,"dead")then 
    respawnPlayer(player) 
    return 
elseif getAccountData(account,"faint")then 
    triggerClientEvent(player,"setPlayerFaint",player,getElementData(account,"faint_tick")or false) 
    return 
end 

Posted
That's right?
if getAccountData(account,"dead")then 
    respawnPlayer(player) 
    return 
elseif getAccountData(account,"faint")then 
    triggerClientEvent(player,"setPlayerFaint",player,getElementData(account,"faint_tick")or false) 
    return 
end 

No, bcause you're returning at elseif, not ending.

it will work perfectly with non-return.

if getAccountData(account,"dead")then  
    respawnPlayer(player)  
elseif getAccountData(account,"faint")then 
    triggerClientEvent(player,"setPlayerFaint",player,getElementData(account,"faint_tick")or false) 
end 

Posted
His topic title says (problem with "return") ,so I focused on what he wants to do, which value wants to return let's wait his answer

He didn't tell what does he want to do with these returns.

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...