Myydraal Posted May 1, 2006 Share Posted May 1, 2006 Ok i have been working on this fricken script for a while. I will state my problem. More or less the script is a quest script, ment to modify some values pertinate to the game world in relation to oblivion gates opening and such. Anyways i can't figure out why, from what i can tell, most of my script does not run. At first i thought they were not egtting into my if statments, then i thought the semi colons within the if statments are messing it up, but no thats not it. I even removed the Fin if statment to see if the doOnce varible would change from a 0 to a 1 like it Fin should. I am going to post two version of the scrip one as i want it to run with the iff statments, and one without the if statment. Also i will be using // for comments for this post, these comment are not accually in my script box, anyways here it goes, hope someone can tell me what the F is wrong. (Sorry for all the swearing, or almost swearing, i'm really pissed at this fricken scripting languge). //With if statment Scriptname MQ00Script short openGates ; number of gates currently openshort maxOpenGates ; max number of gates to be open; if openGates >= maxOpenGates, new gates will not openshort randomGateChance ; chance a random gate will open when the player is nearbyshort destroyedGates ; number of random gates that have been destroyedshort maxCreatureCount ; max number of creatures to spawn at a single gateshort allowGatesToReopen ; set to 1 to allow destroyed gates to reopenref nearOblivionGate ; set to the formID of the gate the player is currently near short previousWeekDate ;the previose date that the number of oblivion gates open was increased.short increment ;the value that increase the gate productionshort decrement ; the value that helps determin how much from the max gates number should be removedshort doOnce; begin GameMode set randomGateChance to 100 //it sets these values correctlyset allowGatesToReopen to 1 //this one too if doOnce == 0 set maxOpenGates to [[MQ00.maxOpenGates - MQ00.destroyedGates] +[[ [GameDaysPassed/7] + 1] *[GameDaysPassed/7]/2.0] + 4] //or this one set decrement to destroyedGates set increment to GameDaysPassed / 7 set doOnce to 1 //does nto set this one set previousWeekDate to GameDaysPassedendif if maxOpenGates <= 90 if GameDaysPassed - previousWeekDate/7 >= 1 set maxOpenGates to maxOpenGates - [destroyedGates - decrement] + increment set previousWeekDate to GameDaysPassed set decrement to MQ00.destroyedGates if increment <= 10 set increment to increment + 1 endif endif else set maxOpenGates to 90endif //Without if statementScriptname MQ00Script short openGates ; number of gates currently openshort maxOpenGates ; max number of gates to be open; if openGates >= maxOpenGates, new gates will not openshort randomGateChance ; chance a random gate will open when the player is nearbyshort destroyedGates ; number of random gates that have been destroyedshort maxCreatureCount ; max number of creatures to spawn at a single gateshort allowGatesToReopen ; set to 1 to allow destroyed gates to reopenref nearOblivionGate ; set to the formID of the gate the player is currently near short previousWeekDate ;the previose date that the number of oblivion gates open was increased.short increment ;the value that increase the gate productionshort decrement ; the value that helps determin how much from the max gates number should be removedshort doOnce; begin GameMode set randomGateChance to 100 //sets these rightset allowGatesToReopen to 1 set maxOpenGates to [[MQ00.maxOpenGates - MQ00.destroyedGates] +[[ [GameDaysPassed/7] + 1] *[GameDaysPassed/7]/2.0] + 4] set decrement to destroyedGates set increment to GameDaysPassed / 7 set doOnce to 1 //does not set these set previousWeekDate to GameDaysPassed if maxOpenGates <= 90 if GameDaysPassed - previousWeekDate/7 >= 1 set maxOpenGates to maxOpenGates - [destroyedGates - decrement] + increment set previousWeekDate to GameDaysPassed set decrement to MQ00.destroyedGates if increment <= 10 set increment to increment + 1 endif endif else set maxOpenGates to 90endif Tell me if u have any ideas, cause i sure as hell don't Link to comment Share on other sites More sharing options...
alternator Posted May 1, 2006 Share Posted May 1, 2006 Is any of your quest script actually being processed? If not the first thing I would expect is that the quest has not been started, easiest way around this is to flag it to start as soon as the game starts (atleast to check this). Alo I am not sure about using '[]' vs '()' in math expressions, I guess if you don't get a complie error it is supported. Link to comment Share on other sites More sharing options...
Myydraal Posted May 1, 2006 Author Share Posted May 1, 2006 i'll look at the [] in math expression but i swear thats what somethin online used, maby the wiki, used instead of (), so i assumed () was not supported cause well, Beth script is stuiped? anyways i have the box checked and yes PART of the script is being proccessed, the first lines where i initlize the randomGateChance to 100 and the allowGatestoReopen. Thats why its so Fed up, idk. Link to comment Share on other sites More sharing options...
alternator Posted May 1, 2006 Share Posted May 1, 2006 i'll look at the [] in math expression but i swear thats what somethin online used, maby the wiki, used instead of (), so i assumed () was not supported cause well, Beth script is stuiped? anyways i have the box checked and yes PART of the script is being proccessed, the first lines where i initlize the randomGateChance to 100 and the allowGatestoReopen. Thats why its so Fed up, idk. crazy :wacko: , I guess the only other thing I could think of is do you have an 'End' command for your script? Although I can't see any real reason why part of the script processes and then the rest is ignored, perhaps try removing lines of code above the set DoOnce operation to see if it starts to work after one of the lines is removed. I remember back with Morrowind it was somewhat dicey if your commands would process properly, but the mod I have written for this which I would class as quite taxing on the scripting system seems to run fine. I used '()' brackets in math expressions, other rule I followed was to put comments on their own line, I'm not too sure if this is an issue or not but it was something I am weary of. Link to comment Share on other sites More sharing options...
Myydraal Posted May 2, 2006 Author Share Posted May 2, 2006 Well it seems to have been the [], though i see why i was using the [], its cause i learned alot of the scripting languge by looking at their scripts and the text editor that they use displays []'s VERY similarly looking too (), which confused me. What i REALLY hate about this whole issue is there was no fricken compile time error saying "don't use []s!", so what are they used for i wonder.....or is Beth script that Fed up....anyways thanxs for the tip Alternate Theory. Please lock this topic Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.