Welcome to the Achaea Forums! Please be sure to read the Forum Rules.

mushclient global variable assignment on connect

MeliniMelini Member Posts: 9
Disclaimer:  I'm using mushclient as I'm coding for visually impaired players, so please don't answer simply with a suggestion to use a different client!

How do I initialise a global variable on connection?

I understand there is a global script defined in 'Scripts' as "External Script File".

I've defined a function in there called onLoad().

I've named this function in the "World Events - Connect".

However, when I am logged in I test my variable and it still says undefined.

This is my onLoad function...

function onLoad()
boolInCombat = false
end

Comments

  • AmmarAmmar Member Posts: 9
    What I did was set my function to load on the text "Password correct. Welcome to Achaea." That fires onLoad() which assigns all the variables.
Sign In to Comment.