Jump to content

[Question] key


Stranger

Recommended Posts

Posted

hello guys

i was wondering if i can put the "Key" in other file "lua"

i mean

can i do like this ?

bindKey 

can i put the

bindKey 

in file and the key in other file ?

server.lua

bindKey(key, "down") 

key.lua

local key = "F1" 

can i do it like that ? cause i tried to do it like that but didn't work

cause i want to encrypt a file, but only think they can change is the 'key'

or other ways

and thank you

Posted

It should work, but if the key variable is defined in an another file this file must be loaded before the file wich contains the bindKey, and don't use local in that case.

Posted

Possibly it would work with a timer too, but a better way to make sure that one script file gets loaded before an other is to put it before the another file in the meta.xml.

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