Hello Twine Community,
I've been following the video tutorial series by Vegetarian Zombie. Most recently, I used his Using Macros video to display three player stats at the top of each slide where the macro was placed. When I add the macro to the slide and play, I receive two errors:
1. a popup error that states "Error [tw-user-script-0]: Unexpected token <."
2. An error in the debug mode of Twine that states "Error: macro <<stats>> does not exist."
Here's the code I used to create the script, per the YouTube video series.
I'm going to start learning JavaScript on Code Academy, because I think it would help me recognize what's wrong here, but any advise in the meantime is much appreciated!
I've been following the video tutorial series by Vegetarian Zombie. Most recently, I used his Using Macros video to display three player stats at the top of each slide where the macro was placed. When I add the macro to the slide and play, I receive two errors:
1. a popup error that states "Error [tw-user-script-0]: Unexpected token <."
2. An error in the debug mode of Twine that states "Error: macro <<stats>> does not exist."
Here's the code I used to create the script, per the YouTube video series.
macros.stats = { handler : function(place, macroName, params, parser) { var player = params[0,1,2]; new Wikifier(place, "Experience: " + player.experience); if (player.experience >= 1 && < 20) { new Wikifier(place, "Rank: What is TEAMS?"); } if (player.experience >= 20 && < 40) { new Wikifier(place, "Rank: Novice"); } } }
I'm going to start learning JavaScript on Code Academy, because I think it would help me recognize what's wrong here, but any advise in the meantime is much appreciated!