Editing Script Compiler Override

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 1: Line 1:
==Overview==
==Overview==
If using [[Let]], [[Eval|if eval]], [[While]], [[Print]] and some other new NVSE functions, it is permitted to pass [[Array Variable|array elements]], [[String Variable|string variables]] and [[User Defined Function|(perhaps user defined)]] nested function calls directly as parameters. However, the vanilla script compiler will prohibit direct passage to vanilla and older NVSE functions, complaining that the paramater type is invalid (it isn't sure what type the array element or function return will be, since it could potentially be any). Typically, this forces you to use an intermediary variable. Alternatively, the script compiler override (CO) allows you to ignore these 'misgivings', and assuming that you know the types are safe, compile scripts that will work correctly.  
If using [[Let]], [[Eval|if eval]], [[While]], and some other new NVSE functions, it is permitted to pass [[Array Variable|array elements]], [[String Variable|string variables]] and [[User Defined Function|(perhaps user defined)]] nested function calls directly as parameters. However, the vanilla script compiler will prohibit direct passage to vanilla and older NVSE functions, complaining that the paramater type is invalid (it isn't sure what type the array element or function return will be, since it could potentially be any). Typically, this forces you to use an intermediary variable. Alternatively, the script compiler override (CO) allows you to ignore these 'misgivings', and assuming that you know the types are safe, compile scripts that will work correctly.  


To use the CO, you prefix a script block type with an underscore (eg: <b>Begin _GameMode</b>). See the following examples for further details, and also the warning at the end of this article.
To use the CO, you prefix a script block type with an underscore (eg: <b>Begin _GameMode</b>). See the following examples for further details, and also the warning at the end of this article.
 
==Example #1==
==Example #1==
Let's say we have a number that we want to get the [[Floor]] of, the nearest whole number lower than the float. The vanilla compiler will know what we want to do if we specify it as a float variable that we pass to the floor function as a parameter:
Let's say we have a number that we want to get the [[Floor]] of, the nearest whole number lower than the float. The vanilla compiler will know what we want to do if we specify it as a float variable that we pass to the floor function as a parameter:

Please note that all contributions to the Fallout3 GECK Wiki are considered to be released under the Creative Commons Attribution-ShareAlike (see GECK:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

Cancel Editing help (opens in new window)