When you're making the JSON file, it seems to fail if the root package objects 'name' key has any capital letters in it. Turn the name fully lowercase, and it works like a charm. Now I can get back to designing my system.
EDIT: The Value of the name key, so
{ "name": "a system"} works, while {"name": "A system"} Doesn't.
Alright, I have a confusing question. I didn't like the IRE targetting on the HTML5 and after you guys made the Settarget stuff I had a function that actually targeted twice and I have no idea how to make this HTML5 client do that
This is what I thought it would be.
var t = client.set_variable("tar ", args[0]); client.send_direct("settarget");
obviously the function is t, but I can't get it to work! Any ideas on what I am doing wrong?
When you're making the JSON file, it seems to fail if the root package objects 'name' key has any capital letters in it. Turn the name fully lowercase, and it works like a charm. Now I can get back to designing my system.
EDIT: The Value of the name key, so
{ "name": "a system"} works, while {"name": "A system"} Doesn't.
Good find, we'll get that sorted out!
Just a heads up - the autosipper is back online, new and improved for version 2.2.
The first just sets the target to the argument. The second sets a javascript variable and uses it to target. The third sets a client variable and uses it to target.
edited for clarity and because I am too exhausted to type, apparently.
The first just sets the target to the argument. The second sets a javascript variable and uses it to target. The third sets a client variable and uses it to target.
edited for clarity and because I am too exhausted to type, apparently.
Um, the second one worked when I did it. I'm not on HTML5 now but I am pretty sure that the second was basically what I used and it worked correctly.
The second being: var t = client.set_variable("tar", args[0]); client.send_direct("settarget " + args[0]);
The first just sets the target to the argument. The second sets a javascript variable and uses it to target. The third sets a client variable and uses it to target.
edited for clarity and because I am too exhausted to type, apparently.
Um, the second one worked when I did it. I'm not on HTML5 now but I am pretty sure that the second was basically what I used and it worked correctly.
The second being: var t = client.set_variable("tar", args[0]); client.send_direct("settarget " + args[0]);
While it works, the first part is unnecessary. It is setting a client variable, but isn't using it. Also, the t = client.set_variable is silly - it's setting t to the return value of the set_variable function... which is bound to be useless. The second (client.send_direct) is the same as the first in the last set of three examples above, and is what's actually doing something. Like I said, wasn't really paying as much attention as I should have been when I tried to write it.
The first just sets the target to the argument. The second sets a javascript variable and uses it to target. The third sets a client variable and uses it to target.
edited for clarity and because I am too exhausted to type, apparently.
Um, the second one worked when I did it. I'm not on HTML5 now but I am pretty sure that the second was basically what I used and it worked correctly.
The second being: var t = client.set_variable("tar", args[0]); client.send_direct("settarget " + args[0]);
While it works, the first part is unnecessary. It is setting a client variable, but isn't using it. Also, the t = client.set_variable is silly - it's setting t to the return value of the set_variable function... which is bound to be useless. The second (client.send_direct) is the same as the first in the last set of three examples above, and is what's actually doing something. Like I said, wasn't really paying as much attention as I should have been when I tried to write it.
I could tell you why I do that, but then I would have to kill you.
No but really I like to see my target and I don't feel like making a new silly little button thing to do that when I can just set the tar variable and set my curses to: curse bleed. As opposed to setting my curses to curse @tar bleed. Then I can use the tar variable as a marker for who I set the settarget to and even change it for triggers to target two people at once :P
When you're making the JSON file, it seems to fail if the root package objects 'name' key has any capital letters in it. Turn the name fully lowercase, and it works like a charm. Now I can get back to designing my system.
EDIT: The Value of the name key, so
{ "name": "a system"} works, while {"name": "A system"} Doesn't.
The problem wasn't malformed JSON. I'm making my JSON with Javascript's JSON.stringify. It's perfectly valid. The problem, as I stated to Tecton, was that it failed with any capital letters in the reflex groups name field. It would believe that it imported successfully, but then be unable to reference if, as it's looking for the wrong key in an Object, therefore not being able to trigger any triggers, or even delete itself. Changing the came to completely lowercase solved the issue.
Comments
This is what I thought it would be.
var t = client.set_variable("tar ", args[0]); client.send_direct("settarget");
obviously the function is t, but I can't get it to work! Any ideas on what I am doing wrong?
Site: https://github.com/trevize-achaea/scripts/releases
Thread: http://forums.achaea.com/discussion/4064/trevizes-scripts
Latest update: 9/26/2015 better character name handling in GoldTracker, separation of script and settings, addition of gold report and gold distribute aliases.
Alright, tried all versions, only one that worked was actually the second one! yay!
Site: https://github.com/trevize-achaea/scripts/releases
Thread: http://forums.achaea.com/discussion/4064/trevizes-scripts
Latest update: 9/26/2015 better character name handling in GoldTracker, separation of script and settings, addition of gold report and gold distribute aliases.
The second being: var t = client.set_variable("tar", args[0]); client.send_direct("settarget " + args[0]);
Site: https://github.com/trevize-achaea/scripts/releases
Thread: http://forums.achaea.com/discussion/4064/trevizes-scripts
Latest update: 9/26/2015 better character name handling in GoldTracker, separation of script and settings, addition of gold report and gold distribute aliases.
No but really I like to see my target and I don't feel like making a new silly little button thing to do that when I can just set the tar variable and set my curses to: curse bleed. As opposed to setting my curses to curse @tar bleed. Then I can use the tar variable as a marker for who I set the settarget to and even change it for triggers to target two people at once :P
Results of disembowel testing | Knight limb counter | GMCP AB files
in that function I put simply the script: var t = client.set_variable("tar", args[0]); client.send_direct("settarget " + args[0]);
There is no debating that it works, because I just hunted some rats with it!
var t =
part of your code is irrelevant, it would also work if you just did:client.set_variable("tar", args[0]); client.send_direct("settarget " + args[0];
Also, the specific thing I was talking about was one of Trevize's suggestions.
Results of disembowel testing | Knight limb counter | GMCP AB files