The method expects a number to be used in the brackets, which is fine. But I want to run some other code and use a number stored in a variable. I'm running some code to work out what injection rate I need. Ideally I'd like to run something like this:
local a = 2
component.reactor_logic_adapter.setInjectionRate(a)
But of course that doesn't work haha. Is there a way I can insert a variable like that?
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
Hi all,
I hope this hasn't been covered before. I also hope it's not something insanely simple... Hopefully I get my terminology right.
So I'm running apiece of code which sets the injection rate for a fusion reactor, the line reads:
The method expects a number to be used in the brackets, which is fine. But I want to run some other code and use a number stored in a variable. I'm running some code to work out what injection rate I need. Ideally I'd like to run something like this:
But of course that doesn't work haha. Is there a way I can insert a variable like that?
Link to post
Share on other sites