Your syntax and structure is basically sound - a good first attempt at scripting, but you stumbled over
OnActivate (and probably
GameHour as well).
OnActivate (I wish this forum didn't change my capitalization) is not a variable to be declared. It is more of a function that returns a value of 1 (true) when the object to which the script is attached is activated. When you declare
short OnActivate now all references to
OnActivate will look to a value stored in the local variable by that name and not the function
OnActivate. Since at no time is the local short variable
OnActivate set to 1 your message never displays.
GameHour is an officially declared global variable that keeps track of time. if you intend to reference that global variable you must not declare it as a local float variable in your script. Again, locally declared variables trump functions and global variables making the latter inaccessible by your script.
You will also get an error on the line
Set GameHour to GameHour +6. There needs to be a space between '+' and '6':
Set GameHour to GameHour + 6. I cannot remember with certainty the results of my own tests as to what will happen if
GameHour is greater than 18 when this is done. I know it will adjust it to be less than 24 (e.g. if
GameHour equals 20, then
GameHour + 6 equals 2, but I do not recall if it increased
Day by one to the next day. Just check for it in your tests. It is one of the reasons I am a little nervous about changing
GameHour in my scripts. There is also some uncertainly what your changes could do to other scripts running that are checking
GameHour.
I notice that for
if ( Button == 0 ) you do not reset MessageOn to 0. That probably does not matter since when you fix (not declare)
OnActivate MessageOn will the set to display the message anyway. However there is a little room for improvement in the structure of that part of your script. Something like:
If ( MessageOn == 2 ) Set Button to GetButtonPressed If ( Button == -1 ) Return ElseIf ( Button == 0 ) Player->Additem, "Gold_001", 100 Player->ModArmorer 1 Set GameHour to GameHour +6 ElseIf ( Button == 1 ) ; nothing need be done EndIf Set MessageOn to 0 ReturnEndIf
Since you asked, here are a couple of links to the principal scripting resources used by modders:
http://www.tamriel-rebuilt.org/files/tuts/MWSFD90_Word.zip
http://www.uesp.net/wiki/Tes3Mod:Modding
There are many tutorials linked from the pinned threads at the top of this forum, and of course you are always welcome to post questions you have in this forum. There are many capable members of our community who are willing to help. The first link takes you to Tamriel Rebuilt's website that offers many excellent tutorials and utilities for modders.
Although you didn't ask for it, I will also offer my own thoughts about what you are trying to achieve. By all means complete the script and revel in the success of it, but it is a little silly for a note to hire and compensate the player for a job. This would be more logically achieved through dialog with an NPC that hires the player. Dialog would handle whether or not the player accepts the job, and if the player does, then dialog results (or a global script started from dialog results) would pay the player and advance time. It is a simple matter to add the attribute checks for strength and endurance as dialog filters. You can also introduce a FadeOut and FadeIn to simulate the passage of time. This can be done in your original scripted solution as well. You might also consider adding a messagebox declaring that the player's armorer skill has increased. Whichever approach you decide to take with your project good luck.
Postscript: Don't talk about my mother. :angry: