Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
I have a large grid platform with the Easy Commands programming block, a timer block, a light, and a solar panel for energy.
The timer block is set to turn on/off the light so I can see if it works or not. If I trigger the timer block manually through the control panel it works as expected and turns on/off the light. However if I try to get the Easy Commands programming block to trigger the timer block I get an exception error.
Here is the code:
----
trigger "EZC Test TB"
wait 2 seconds
trigger "EZC Test TB"
----
Note: EZC Test TB is the name of the timer block and was copy/pasted directly from the control panel into the custom data code.
This is the error I get:
----
Exception Occured During Parsing
Unable to parse command from
command parameters at line
number: 1
----
For kicks i put in the silence command for the timer block to see if that would change anything.
----
silence "EZC Test TB"
wait 2 seconds
silence "EZC Test TB"
----
I got the same exception error as above.
and to rule out the programming block acting up I inputted this code
----
turn off "EZC Test Light"
wait 2 seconds
turn on "EZC Test Light"
----
The script completes and the light turns off and on as expected.
So yeah, not sure why but it doesn't like this timer block. Is this a bug or am I dumb?
EasyCommands parses each line into a command, and needs to know at parsing time whether the thing in double quotes is a Selector, or just a string.
To determine whether it is a selector or a string, EasyCommands checks whether the given string contains a known Block Type of Block Group Type keyword. If so, it is considered as a possible Selector, vs just a string.
If the given string doesn't contain a known Block Type, you need to tell EasyCommands that the given string is supposed to be a Selector by supplying a Block Type or Block Group Type after the string.
So for the Timer Blocks, instead of
silence "EZC Test TB"
you'd need to specify
silence "EZC Test TB" timer block
Alternatively you can change the name to include a Block Type keyword, like "Timer". This is why "EZC Test Light" is working, since "Light" is a known Block Type.
Check out Selectors for more information:
https://spaceengineers.merlinofmines.com/EasyCommands/selectors
Hope that helps!
The command
print "Hydrogen Tank" level
spits out
Exception Occurred:
LargeHydrogenTank does not have property (unknown symbol - a question mark in a sideways square symbol)
Can you confirm you are using the latest Easy Commands version on that block?
I've added an issue to address the bad output messaging, but I think the property is supported in the latest version (just tried myself):
https://github.com/MerlinofMines/EasyCommands/issues/162
Running the latest version of the code on both grids.
On the receiving end I have this:
async call comms
:comms
listen "ReferenceCoords"
wait until false
repeat
On the sending side I have this:
:TransmitReference
set Command to "set global reference to " + ("Remote Control" position) + " as vector"
print Command
send Command to "ReferenceCoords"
repeat
And it works. It does what it needs to do BUT.
if you change something in custom data of the reciever so it has to do parsing again, instead of just starting out as normal, it will spit out this:
Queued threads: 1
Async threads: 0
message [ReferenceCoords]
Complete.
and nothing works.
Unless I recomplie the block, at which point everything starts to work. Right up until you change something in custom data, at which point it once again spits out the same thing
Thanks for bringing this one to my attention, I think I see what's happening here and it's definitely a bug. I've added an issue to address this:
https://github.com/MerlinofMines/EasyCommands/issues/167
If you run
Print "Display names: " + "a Programmable block" display names
the print shows all display names in ", except for Keyboard.
So it is printing >>"Large Display"<< but only >>Keyboard<<
Nothing breaking and more a cosmetical than a functional issue imho.
'"a Programmable block" display names' is internally represented as a list of strings and for some reason its print function wraps anything that contains a space in the end into quotes.
I believe this is one i had done intentionally. When printed using the print command, string values containing a space are wrapped in quotes to clarify that they are part of a single string.
We could change this behavior to always wrap strings by checking whether the input type is String and if so, wrapping. I didn't do it everywhere because I found that having the quotes around every key / value when looking at the map got annoying. I agree with the inconsistency when looking at the values via print.
The quotes are not actually part of the value, and are not present if you use the values directly, however:
print my display names joined "\n"
I believe I have fixed the bug related to active messages halting your script after updating the script and re-parsing. I was able to re-produce the bug locally and with the fix I couldn't re-pro it any longer. Can you confirm it is fixed for you?
The issue with bad output property messaging is also fixed
I believe you are correct. I can't reproduce the bug again either.
I appreciate that very much! thank you!
Which is why I hate to be the nitpicky guy with regards to the encyclopedia page. If these are the sort of issues you'd rather not be brought to your attention at the moment, I will keep them to myself in the future.
Having said that
Door Block Handler page - missing keywords for both the block and the group.
Light Block Handler page - key word for intensity has a typo - it reads "intesity" - I copied it over as is without looking, to avoid making a typo myself and spent some time trying to track down the source of the error.
These are the two I tracked down.
As an apology for nitpicking - allow me to show you what I've used your code for.
(you want to interact with the lcd on the blue structure. Should be self-explanatory enough, I hope ^_^)
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=2742135759
P.S. Disregard the missing mod warning - it's just a bunch of unrelated stuff - you want to look at the cryostorage and it's all vanilla
The CryoStorage facility is really cool! With your permission I'd like to add it to my EasyCommands examples world (still WIP) so that other folks can benefit from it. Great use of EasyCommands! :)