question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Hyphenated item script container names

See original GitHub issue

Item scripts fail if they contain a hyphen. If it’s changed to an underscore it works as expected.

test-hyphen:
  type: item
  display name: hyphen
  material: i@iron_chestplate
[14:40:12 INFO]: Nilsentience issued server command: /ex narrate <i@test-hyphen.material>
[14:40:12 INFO]:  Starting InstantQueue 'EXCOMMAND_MaritimeJewelryShowing'... 
[14:40:12 INFO]:  Queue 'EXCOMMAND_MaritimeJewelryShowing' Executing: NARRATE "<i@test-hyphen.material>" 
[14:40:12 INFO]: +- Executing dCommand: NARRATE/p@Nilsentience ---------+ 
[14:40:12 INFO]: +> [dItem] valueOf dItem returning null: test-hyphen 
[14:40:12 INFO]:  ERROR! i@test-hyphen is an invalid dObject! 
[14:40:12 INFO]:  Filled tag <i@test-hyphen.material> with 'i@test-hyphen.material'. 
[14:40:12 INFO]:  ERROR! Tag <i@test-hyphen.material> is invalid! 
[14:40:12 INFO]: +> Executing 'NARRATE': Narrating='i@test-hyphen.material'  Targets='[p@Nilsentience]' 
[14:40:12 INFO]:  Completing queue 'EXCOMMAND_MaritimeJewelryShowing' in 3ms.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

6reactions
mcmonkey4evacommented, Apr 4, 2016

I’m not sure why it wouldn’t actually work… just like… good practice to never include random symbols in your script titles, variable names, etc.

Keep it: A-Z, a-z, 0-9, _

0reactions
Morphan1commented, Apr 4, 2016

I’m confused. Why is that symbol disallowed anyway? I don’t remember there ever being anything in place to prevent it on our side. In fact, I used it multiple times in scripts some time ago and it worked just fine, although those were probably task scripts I guess.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Switch to using hyphens as a separator in hostnames #229
I can work around it using fixed container names without underscores but it precludes the use of the docker-compose scaling mechanism since the ......
Read more >
Are dashes allowed in javascript property names?
Thus, the answer is actually "yes"... dashes are allowed in property names, as demonstrated above. They must be accessed using the above demonstrated...
Read more >
hyphens - CSS: Cascading Style Sheets - MDN Web Docs
The hyphens CSS property specifies how words should be hyphenated when text wraps across multiple lines. It can prevent hyphenation entirely ...
Read more >
Search 'item script containers' | Language Explanations
Name, Item Script Containers. Description, Item script containers are an easy way to pre-define custom items for use within scripts. Item
Read more >
Can shell variable name include a hyphen or dash (-)?
If your script depends on having variable names have hyphens, that's a programming error. ... Read second item in this page.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found