Skip to content

Commit

Permalink
fix "basic" hud
Browse files Browse the repository at this point in the history
  • Loading branch information
NGSpace committed Dec 19, 2024
1 parent fd37291 commit bde7fe7
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public void bindConsumer(IMethod method, int length, String[] args, String... na
* @throws CompileException - if there is no method with that name.
*/
public IMethod getMethodFromName(String name) throws CompileException {
IMethod method = methods.get(name.toLowerCase());
IMethod method = methods.get(name.toLowerCase().trim());
if (method==null) throw new CompileException("Unknown method " + name);
return method;
}
Expand Down
8 changes: 8 additions & 0 deletions src/main/resources/assets/hudder/UnitTests.hudder
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,14 @@ CaSE SenSitive CaSE SenSitive CaSE SenSitive
||EXPECT||
2

||INPUT||Spaced divide method
#def divide, num1, num2
{result=num1/arg2}
; divide, 4, 2;
{result}
||EXPECT||
2

||INPUT||Divide function
#def divide, num1, num2
#if num2==0
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/assets/hudder/basic
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
&r{FPS} (max. {maxfps} avg. {avgfps} min. {minfps}) {usedram_percentage}\% of {maxram}MB
X: {x}, Y: {y}, Z: {z}; run, "hand";
X: {x}, Y: {y}, Z: {z};run, "hand";

0 comments on commit bde7fe7

Please sign in to comment.