Finally, a word about form: Consider putting spaces around the parentheses. Consider removing spaces around the fix. In fact, I think you'll find the 'player ->' is not needed at all. Such changes won't make an apparent difference, but might have some subtle undertones.
According to MSFD, the form used to write a script can indeed lead to strange problems, so you should indeed try these to fix your bug.
? Get used to always leaving spaces around parentheses and operators, sometimes it seems to cause problems if you don't: if ( variable == 1 ), not: if (variable==1). While this doesn’t matter most of the time it generates weird and almost untraceable errors sometimes, so you are much better off always leaving a space.
? The fix (->) is a little more complicated. If IDs are contained in quotes, you should not leave spaces around the fix: "Sirollus Saccus"->GetItemCount netch_leather_greaves. The above will work, but spaces around the fix would cause problems. (Thanks to Simpleton and DinkumThinkum for this info.) However, since it has also been reported that a lack of quotation marks can cause problems in combination with spaces round the fix, I'm going to recommend that you don't leave spaces round the fix at all (should be fine in all cases).
stopscript artif_tools_journal
The function stopscript doesn't have any effect when it is used in a local script (all the scripts that are attached to an activator, a NPC...) and it only works in global script. Instead, you can use something like 'if ( condition) - return - endif', which won't stop the script, but at least save a few FPS by preventing most of the script of running.
I would try something like that:
begin artif_tools_journalshort doonceif ( onactivate == 1 ) activate if ( doonce == 0 ) set doonce to 1 Journal artif_enable 5 addtopic "Create Wand" endifendifend
or with Stuporstar version:
Begin artif_tools_journalShort OnPCEquipShort PCSkipEquipShort ActionFlagShort doOnce; PCSkipEquip is set to 1 every time the book is equipped from your inventory.If ( PCSkipEquip == 1 ) Set PCSkipEquip To 0 Set ActionFlag To 1 ReturnEndIf; These lines are important, otherwise the book cannot be picked up from the ground.If ( MenuMode == 1 ) ReturnEndIfIf ( ActionFlag == 1 ) If ( doOnce == 0 ) Journal artif_enable 5 addtopic "Create Wand" Set doOnce To 1 Endif Set ActionFlag To 0EndIf; For activating the book when it is placed in the game world.If ( onactivate == 1 ) Set ActionFlag To 1 ActivateEndIfEnd
One more thing, each time you try a new version of your mod, you must do it with:
- a new game (maybe a little bit too much)
- with a savegame with which you have never used your mod before (the option I would prefer to use)
- you can also try to clean your savegame (use Wrye Mash for this) each time you upgrade your mod