Anonymous user
Scripting hints: Difference between revisions
Jump to navigation
Jump to search
no edit summary
No edit summary |
No edit summary |
||
Line 19: | Line 19: | ||
* '''Optional parameters only work with int and enum''' parameters, you can't do it with strings or floats. | * '''Optional parameters only work with int and enum''' parameters, you can't do it with strings or floats. | ||
:''How about '''S'''trings?'' | :''How about '''S'''trings?'' | ||
:'''''You can make a String parameter optional by setting it to 0 (which is the equivalent of setting it to null. | :'''''You can make a String parameter optional by setting it to 0 (which is the equivalent of setting it to null). You can also do this with other pointer types, such as Character*. You just have to remember that if you make it optional this way then you shouldn't crash the game if it's null.''''' | ||
* Basically, to be consistent with Java/C#, the '''protection level always goes first when using protected functions''': [http://www.bigbluecup.com/yabb/index.php?topic=19369.msg226163#msg226163] | * Basically, to be consistent with Java/C#, the '''protection level always goes first when using protected functions''': [http://www.bigbluecup.com/yabb/index.php?topic=19369.msg226163#msg226163] |