运行ometpp.ini文件时遭遇OMNeT++解析错误的解决方案求助
This error happens because OMNeT++'s display string syntax doesn't allow spaces between the tag name (like i here) and the equals sign. Let me walk you through the fix:
What's triggering the error?
Looking at your NED code, the line @display("i = block/routing"); has unnecessary spaces around the equals sign. OMNeT++'s parser treats that space right after i as part of the tag name—since spaces aren't allowed in tag names, it throws the "illegal character" error you're seeing.
How to resolve it
Just remove the spaces around the equals sign in the display string. The strict syntax requires the tag name and its value to be connected directly with = without any whitespace in between.
Here's your corrected code snippet:
simple nodeR { parameters: @display("i=block/routing"); @signal[arrival](type="long"); @statistic[hopCount](title="hop count"; source="arrival"; record=vector,stats; interpolationmode=none); gates: inout gate[]; }
Quick tip for future work
All display string properties (like x, y, label, etc.) follow this rule. Never add spaces between the property name and the = sign, otherwise you'll hit the same parsing issue again.
内容的提问来源于stack exchange,提问作者Key_z

