Yeah so brand new.
I would like to have an inventory and for different choices to become available depending on what item you have. Like say you get a choice between picking up a dagger or a cake, later on in the game you encounter an event which will change depending on what item you picked up earlier.
The Twine 1 Wiki has a section on Variables. You could use a variable to track which item was picked up and then check the value of the variable later to determine what should be done.
There are many ways to use variables, from the simple to the complex, the following example uses a single variable to track which item the Reader is currently holding. If they are holding nothing then the variable is empty, otherwise it contains the name of the item: ... later on you could use an <<if>> macro to check what item the Reader is holding:
okay I tried <<set $holding to "dagger">> and get the error message "Twine 2 macros use a different syntax to Twine 1 macros."
The default story format of Twine 2 is Harlowe and that perticular story format uses a different macro syntax than the Twine 1 story formats. The Twine 1 wiki links I gave will be less useful for Harlowe, information about it can be found in it's documentation and project overview, and you should also read the Twine 2 guide.
The Harlowe equivalent of the examples I gave are: ... and: ... note the different macro syntax, Harlowe uses a single open parentheses at the start of the macro, a full colon after the macro name and a single close parentheses at the end of the macro. ... some macros like (if:) have an associated hook which encloses the content the macro is applied to, a hook starts with a single open square bracket and ends with a single close square bracket.
That the error message is misleading doesn't help (it would be better as "Harlowe macros use a different syntax to Twine 1 macros.").