#Basic syntax problem?? I think??

1 messages · Page 1 of 1 (latest)

zenith jay
#

I have a custom command (varm). It adds variables to the game by essentially replacing the variable namespaces with whatever it's stored as. The varm part is to let the command come to my parser first. Example:

varm give @s $variableName 64
# This would turn into:
give @s minecraft:stone 64
# (the variable syntax is similar to bash)

To set and adjust variables, I use a /varm variable command. The idea was to put something like the following:

if (args[0] == "variable") {
  // Do stuff to adjust variables here
} else {
  // Assume I'm running a command through my custom parser
}

The problem is, whenever I run /varm variable, instead of going to the code I set, it returns the default "Unknown command. Type /help for list of commands."

Excerpt of my CommandExecutor: https://www.toptal.com/developers/hastebin/ifayisibav.java

Any ideas? Thanks in advance!

#

oh my god

#

I needed to put .equals instead of ==