It's because you're using a single "=" sign in the if() section, it needs to be 2 when you're asking if something is equal to something else.
Hey, Im getting this error. "Right parentesis missing to close if-statement"Code:if (LS == "annoy" & Annoy = 0) {Annoy = 1} elseif (LS == "annoy" & Annoy = 1) {Annoy = 0} if (LS == "cloak" & Cloak = 0) {Cloak = 1} elseif (LS == "cloak" & Cloak = 1) {Cloak = 0}
It works fine if I take out the "& Annoy = whatever" and "& Cloak = whatever", But I need those to be able to toggle the commands. Can anyone reformat this for me? I cant figure this out.
ALSO
How can I get a whole sound to play via my text commands. Annoy is supposed to play a whole sound. When I have interval or runontick at the top or anywhere else, it constantly restarts the sound (which is why its now named "Annoy") Can anyone help me please? Also, please dont post some crap about "go to the wiki" or something. I hate when you ask for help and people say that. (I have already looked around there. :P)
It's because you're using a single "=" sign in the if() section, it needs to be 2 when you're asking if something is equal to something else.
This should work.Code:if (LS == "annoy" & !Annoy) {Annoy = 1} elseif (LS == "annoy" & Annoy) {Annoy = 0} if (LS == "cloak" & !Cloak) {Cloak = 1} elseif (LS == "cloak" & Cloak) {Cloak = 0}
"If anybody says he can think about quantum physics without getting giddy, that only shows he has not understood the first thing about them."
-- Niels Bohr
He basicly made toggles, this would be a better way to make those.
2 if-statements instead of 4.
Code:if (LS == "annoy") { Annoy = !Annoy } elseif (LS == "cloak") { Cloak = !Cloak }
I didn't try to make his expression shorter -- only working.![]()
"If anybody says he can think about quantum physics without getting giddy, that only shows he has not understood the first thing about them."
-- Niels Bohr
Bookmarks