Difference between revisions of "Category talk:Scripting"
Jump to navigation
Jump to search
divided this page up some, and answered a few things
imported>Skogstad |
imported>DragoonWraith (divided this page up some, and answered a few things) |
||
Line 1: | Line 1: | ||
==Line number limit== | ==Line number limit== | ||
Is there a limit to the number of lines a script can contain? I'm currently editing a script with about 52 lines (including debug code to later be stripped), and the CS refuses to save changes beyond a certain point. If I click on the save button, and then try to edit the script editor, I get the "do you want to save this script" message; if I say "yes", it just returns me to the editor. If I say "no", it closes the editor but the changes are not saved. | Is there a limit to the number of lines a script can contain? I'm currently editing a script with about 52 lines (including debug code to later be stripped), and the CS refuses to save changes beyond a certain point. If I click on the save button, and then try to edit the script editor, I get the "do you want to save this script" message; if I say "yes", it just returns me to the editor. If I say "no", it closes the editor but the changes are not saved. | ||
It _appears_ that if I put any function below line 39, it causes a problem (endifs and ENDS are fine). Perhaps I'm just doing something wrong? [[User:Eallman|Eallman]] 16:20, 4 April 2006 (EDT) | It _appears_ that if I put any function below line 39, it causes a problem (endifs and ENDS are fine). Perhaps I'm just doing something wrong? [[User:Eallman|Eallman]] 16:20, 4 April 2006 (EDT) | ||
:[[User:DragoonWraith|<font face="Oblivion,Daedric" size=3>D</font>ragoon <font face="Oblivion,Daedric" size=3>W</font>raith]] [[User_talk:DragoonWraith|<font face="Oblivion,Daedric" size=2>TALK</font>]] 21:02, 29 June 2006 (EDT): There '''is''' a limit. It's quite large for regular scripts, but result scripts it's only 1024 characters. | |||
== If / Elseif / Else explanation == | |||
Later: obviously not the case, since I just found a Beth script with about 150 lines. | Later: obviously not the case, since I just found a Beth script with about 150 lines. | ||
Line 37: | Line 42: | ||
DO'H! I'm forgetting by basic programming skills <G> Oddly, though, the compiler doesn't complain about this- the script just won't run <G> Acutally, there are a number of errors the compiler doesn't catch- I just found a typo where I'd substituted "77" for logical "&&", and nary a peep. | DO'H! I'm forgetting by basic programming skills <G> Oddly, though, the compiler doesn't complain about this- the script just won't run <G> Acutally, there are a number of errors the compiler doesn't catch- I just found a typo where I'd substituted "77" for logical "&&", and nary a peep. | ||
EA | |||
== ModAV and Negative Values == | |||
But now I've run into another problem. I'm trying to build a script that will allow an item to give a scalar skill boost while it's in inventory based on the player's base skill (You get less benefit the higher your base skill is). Apparently, you can use PLayer.modav with a POSITIVE variable (player.modav var), but you can't decrement the same way (player.modav -var), at least I've found no syntax that the compiler will accept to do this- (I need to do this to "reset" the skill to its regular level). Am I correct in assuming this is a missing feature in the compiler, or am I doing something stupid again? | But now I've run into another problem. I'm trying to build a script that will allow an item to give a scalar skill boost while it's in inventory based on the player's base skill (You get less benefit the higher your base skill is). Apparently, you can use PLayer.modav with a POSITIVE variable (player.modav var), but you can't decrement the same way (player.modav -var), at least I've found no syntax that the compiler will accept to do this- (I need to do this to "reset" the skill to its regular level). Am I correct in assuming this is a missing feature in the compiler, or am I doing something stupid again? | ||
Line 70: | Line 79: | ||
very Byzantine, but it does indeed work | very Byzantine, but it does indeed work | ||
:[[User:DragoonWraith|<font face="Oblivion,Daedric" size=3>D</font>ragoon <font face="Oblivion,Daedric" size=3>W</font>raith]] [[User_talk:DragoonWraith|<font face="Oblivion,Daedric" size=2>TALK</font>]] 21:02, 29 June 2006 (EDT): You don't need to set a separate variable - you just can't use the negative sign in the function's argument (any more than you can use any other mathematical expression), you have to set it to the negative separately: | |||
modav var | |||
set var to -var | |||
modav var | |||
:Would increase and then decrease by the same amount. | |||
A bit off from the original topic: | A bit off from the original topic: |