Trying to sync a local variable

Status
Not open for further replies.
I have a local variable outside of the hooks, to allow it to be accessible from all hooks, but I want to sync it. I tried getting the player node, and I don't know what I'm doing wrong.

Code:
for player in players.iterate
    if player.jointime < 10  //A newly joined player!
        if #player == 0 //Is this the host?
            globallives = 3 //I just started the server, gimme 3 lives.
        else
            globallives = players[0].lives //Sync them with the host.
        end
    end
end

EDIT: James fixed it for me.
 
Last edited:
Status
Not open for further replies.

Who is viewing this thread (Total: 1, Members: 0, Guests: 1)

Back
Top