Jump to content

Variables in Custom Scripts


Lite

Recommended Posts

Is it possible to use variables in the custom scripts? It doesn't work the way it works anywhere else, is there any other method to get it working?

 

My script:

touch /root/testfiles/notworking
touch /root/testfiles/test$[service.GamePort]
kill -9 $( lsof -i:$[service.GamePort] -t )

 

touch(es) are just for testing purposes, the file "notworking" is being created, the other one isn't.

 

Regards,

Florian

Link to comment
Share on other sites

Right now the port is not available but I can add it in the next update. What you can do for now is write it to a file on the after created event and read it in your after stopped event. Deny permissions to that file in the game's file system permissions so the user doesn't see it in file manager and ftp.

Link to comment
Share on other sites

${ThisService_GamePort} doesn't contain the server port either.

 

My testscript, executed in the "After stopped" event:

touch /root/testfiles/notworking
touch /root/testfiles/testpid${Service_Pid}_port${Service_GamePort}_port1${ThisService_GamePort}

Link to comment
Share on other sites

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
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Terms of Use