[Rant] Testing, testing 1, 2, 3, 4, 5, 6, arrghh, 7, still t

Post » Fri Jun 24, 2011 11:06 am

This is a rant - empathy, sympathy and general hugs welcome

Somewhere along the way I have lost my fear of modding and now I attack the CS like an adrenaline charged Redguard

However that slightly unhealthy fear I used to have used to prevent me from getting over-confident ( I think the forum censors me if I use NZ slang and say cocky )

Be having low confidence i used to lean heavily on more experienced modders to help me write scripts (sometimes writing the whole thing) - and therefore the quality was really good

Now for the rant - now I think I know what i am doing i am finding out how much i don't know - so in testing scripts I find it takes many many tests, rewrites and further tests to get it right

I have had error messages I can't even find in MWSFD - Expression error, left eval, right eval, can't find reference in x script was a great one

Today I had the game CTD on me for the first time in ages - I knew it was one of my scripts and I think I've located it down to there not being a space before a bracket e.g. 0] instead of 0 ]

Don't get me wrong i am still in love with my mod and modding in general

Just today after spending 6 hours redoing the same thing over and over and over again I just had to come here and scream silently at my screen.

Actually I feel better already :)
User avatar
Kathryn Medows
 
Posts: 3547
Joined: Sun Nov 19, 2006 12:10 pm

Post » Fri Jun 24, 2011 4:57 am

This is a rant - empathy, sympathy and general hugs welcome

Somewhere along the way I have lost my fear of modding and now I attack the CS like an adrenaline charged Redguard

However that slightly unhealthy fear I used to have used to prevent me from getting over-confident ( I think the forum censors me if I use NZ slang and say cocky )

Be having low confidence i used to lean heavily on more experienced modders to help me write scripts (sometimes writing the whole thing) - and therefore the quality was really good

Now for the rant - now I think I know what i am doing i am finding out how much i don't know - so in testing scripts I find it takes many many tests, rewrites and further tests to get it right

I have had error messages I can't even find in MWSFD - Expression error, left eval, right eval, can't find reference in x script was a great one

Today I had the game CTD on me for the first time in ages - I knew it was one of my scripts and I think I've located it down to there not being a space before a bracket e.g. 0] instead of 0 ]

Don't get me wrong i am still in love with my mod and modding in general

Just today after spending 6 hours redoing the same thing over and over and over again I just had to come here and scream silently at my screen.

Actually I feel better already :)


*Hugs* I know how utterly annoying scripts can be ESPECIALLY when it's only ONE LITTLE space or error then it's like "Oh great! Now I gotta load up the CS, fix it, and HOPEFULLY it works this time! (which is NEVER the case)" I'm just glad you didn't blow a gasket and do something like :brokencomputer:
User avatar
El Khatiri
 
Posts: 3568
Joined: Sat Sep 01, 2007 2:43 am

Post » Fri Jun 24, 2011 4:52 am

cool! another new zealander!
User avatar
Lindsay Dunn
 
Posts: 3247
Joined: Sun Sep 10, 2006 9:34 am

Post » Fri Jun 24, 2011 2:11 pm

Welcome to the world of programming, Illy! :wavey:

You'll be glad to know that your testing pain is shared by every scripter worth their salt. coding is 10% writing and 90% testing - the best programmers always test and test, and test again. The more trial and error you go thru, the more you will become familiar with the MW script syntax and you'll more readily recognize the little mistakes.

Since the CS allows for some flexibility in how the script syntax is constructed, I find the best way to help avoid crashy scripts is to be consistent throughout with the spacing around parentheses and qualifiers and to make sure to use unique script and variable names.
User avatar
Jimmie Allen
 
Posts: 3358
Joined: Sun Oct 14, 2007 6:39 am

Post » Fri Jun 24, 2011 9:17 am

Right there with you! :hugs:
I have spent a whole day or writing-testing-rewriting-retesting a script for MTC (the big bad a create the albums/remove cards/display cards script), tried a dozen different approaches... :nope: :wallbash:
At the end of the day, I thought "Hum, I wouldn't forget to attach the script to my activator? Nah, I couldn't be THAT stupid!!" And yes, I could... :facepalm:
User avatar
Mike Plumley
 
Posts: 3392
Joined: Wed Sep 05, 2007 10:45 pm

Post » Fri Jun 24, 2011 6:26 am

so in testing scripts I find it takes many many tests, rewrites and further tests to get it right


It never changes! I've been doing some scripting again lately, so out of humor I'm going to store an original draft of a script and post it here with the final one sometime. The differences will most likely be incredibly profound!

I have had error messages I can't even find in MWSFD - Expression error, left eval, right eval, can't find reference in x script was a great one


I can give some pointers on these:

Expression error: Usually means a syntax problem; an extra parenthesis or missing quote or something along those lines. (I have posted on my wall in my office area at work: Programming rule #1 -- IT'S ALWAYS A TYPO!)

left eval: There is a problem with the code to the left of the operator. And operator is the ==, !=, <, etc.
right eval: Ought to be self-explanatory by this point, it's a problem to the right of the operator.


The one tip I have is to use MWEdit for all of your script writing and compiling. The compiler is far less forgiving than that of the CS, and will often find errors that would cause an error or CTD which the CS would let through. If you need help configuring MWEdit, please ask. I've got some files and tips I can share which will ease the transition.
User avatar
jeremey wisor
 
Posts: 3458
Joined: Mon Oct 22, 2007 5:30 pm

Post » Fri Jun 24, 2011 10:49 am

>Today I had the game CTD on me for the first time in ages - I knew it was one of my scripts and I think I've located it down to there not being a space before a bracket e.g. 0] instead of 0 ]

Man, mine CTD's a few times an hour. I must have like a whole bunch of spaces missing.
User avatar
YO MAma
 
Posts: 3321
Joined: Thu Dec 21, 2006 8:24 am

Post » Fri Jun 24, 2011 2:00 pm

My modding experience is almost entirely script-based, since I'm no artist -- so I can certainly relate to the difficulties you mention. Scripting (like all programming) is an iterative process; scope it out, create your first implementation, load it up, and test. When it doesn't work, rewrite and retest and repeat until something gives. It can be the simplest problem (like an extra space) or a fundamental flaw in your methodology, but in the end it is always satisfying to get things right.


You'd all laugh if you saw some in-progress footage from when I was making Elemental Magicka (the first version) -- object paths flying wildly out of place, collision breaking left and right, mockery of all kinds from the CS. In many ways I have to accept that Morrowind scripting was never intended to do some of the things we make it do, but with time and effort there are usually some workarounds.

Empathy given ^_^.
User avatar
Siobhan Thompson
 
Posts: 3443
Joined: Sun Nov 12, 2006 10:40 am

Post » Fri Jun 24, 2011 6:41 am

I know how you feel, I've spent a week trying to learn how to write a script that will simply remove spells when you cast them. It's alot more complicated than you would think ( to someone with as much experience as me anyways..) :brokencomputer:
User avatar
Sierra Ritsuka
 
Posts: 3506
Joined: Mon Dec 11, 2006 7:56 am


Return to III - Morrowind