I have been writing a script, and have had lots of trouble with the command OnActivate, infact copy-and-pasting a Beth. made script and saving it results in EXPRESSION errors. Even the following test script results in such errors upon entering a cell where the script is running.
It does not matter...after encountering the problem I made this test script and tried to attach it to continers, doors, misc. objects, everything. All of them give this error when I enter a cell where the script runs. I don't believe there is anything wrong with the script itself but something is not being compiled correctly. If I for instance recompile the script associated with beds then all beds will give this error (as they use OnActivate).
This was a test script that fails. The message box is just some text that will appear. The purpose of this script was to show that there was general trouble with the OnActivate command (alternaively if Beth. made scripts are recompiled they fail in the same way if they use the OnActivate command). It does not matter what I apply it to, the result is an error.
Hmm... That's odd.
I think that the error you are getting is something that you would get if you were using a variable that you hadn't declared...
But OnActivate isn't a variable, it is a function. This sounds more like a bug in the TES editor, if you can't figure it out I'd take it to the official beth forums....
OK I have investigated this problem further. I have created a simple script like the one above and placed it on an object in the census and excise office (my test character is in Seyda Neen). I made and compiled this plugin with just Morrowind loaded, then made a new version with Tribunal added, and a new version with Bloodmoon added, then finally a version with map1v67 added (my script is for a quest so I had been making it with this loaded). The three plugins made with just the master files functioned fine, the one made with map1 loaded as well failed (with the EXPRESSION error). Taking that plugin and loading it without map1 and recompiling the script (no chages) solved the problem. Included are the failed plugin and the one the worked with al three masters loaded.
I have devised a work around that has allowed me to fix the script I am using in the quest:
1.) Load the quest without map1 setting no active files. This will usually generate errors, and you need to include at least all of the objects referenced by your script (it may be necessary to intentionally "dirty" your plugin).
2.) Recompile the script!
3.) Save (you will create a new mod with just the script)
4.) Quit the editor and load Map1, quest, and script plugins and playtest in game, readjust the script as needed.
5.) Merge quest and script. If the script is recompiled after this stage the error becomes manifest.
6.) Make sure the merger was successful.
This error may only occur on my computer and I do not understand it at all, it would be nice if somwone could see if this problem is general.
you named it test it seems... the issue may be as simple as another script already named test. This is why I say make all names atleast unique enough
R:6 I:22 N:30
Screw it, I'm back for sweet sweet TR
Uldar Gerzae: Expect no dodgeballs out of my arse. Though if something were to shoot out of me nether regions it mgiht be wise to dodge it all the same
The scripts are called test_BM and test_M1, IIRC. The problem also occured in scripts named TR_m1_Redram_1, TR_m1_Redram_2, TR_m1_test, and a few other names I tried while examining this problem. Plus it is rather easy to determine if a script name is taken...
Uldar has discovered the cause of this problem, and I posted a fix in Map 1 error reporting (the script causing problems had a logical error in addition to the one causeing this problem). Noir has fixed this and posted a new version of map 1 solving this problem.
Currently I see no real need to. There isn't enough script being claimed and implemented for it to be worth it right now (IMO of course and I could be wrong since I haven't been around.) At any rate that discussion is for the core and this script has been fixed. (Even though it wasn't technically this script.)
Well the OnActivate error was in a 10 line script with 2 lines that made it impossible to use the commands OnActivate and OnDeath, and additionally the script would never function as it was intended as they used the wrong command for what they were trying to do. I think a better idea might be to have people make sure that they tell us if they have a new script in their claim, that way when it is reviewed it becomes the job of the reviewer to determine if the script works properly. Of course then you need reviewers who know how to script to review those claims.
EDIT: if I'd reviewed the bogus script I'd have spent 10 min on this problem instead of two days plus of time lost in working on TR. Add to that the time Uldar spent working on this problme and the time Noirgrim spent not getting his scripts to work and not knowing what was going on and I think we can see the need to do something to ensure that this sort of thing does not occure again.
How did the claim pass if there was a script that didn't work in the claim. Don't people at least list what scripts in thier claims do so people can check if they work? (Apparently I need to check out the review process).
I have no idea, but I have seen at least one claim come across my desk that had a script that was not declared to have any (the one I can think of failed review). Most people don't write readme files anymore which makes it even more difficult especially if the person performing the review does not know how to script. The script in question would not result in error messages in game, and to discover it was not working the playtester would have to kill an NPC they had no reason to kill. The script was supposed to prevent the player from looting the body of an armless khajiit slave, because the armless affect was generated by a gauntlet, and the maker had to hide this from the player somehow.