Skip to content

Commit 5b5477d

Browse files
committed
prefer terminate_this_script
1 parent 7998854 commit 5b5477d

File tree

7 files changed

+10
-10
lines changed

7 files changed

+10
-10
lines changed

sb.tmLanguage.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
"patterns": [
6666
{
6767
"name": "entity.name.function",
68-
"match": "\\b(jump|terminate_this_custom_script|set_time_scale|set_car_density_multiplier|set_time_of_day|print_help|load_sprite|is_key_pressed|print_string_now|print_big_string|print_formatted|nop|wait|create_car|request_model|has_model_loaded|mark_model_as_no_longer_needed|get_time_of_day|does_char_exist|locate_char_any_means_char_3d|is_player_playing|create_player|load_and_launch_mission|create_object|delete_object|add_blip_for_coord|remove_blip|set_object_coordinates|get_object_coordinates|is_button_pressed|store_car_char_is_in|warp_char_into_car|explode_car|set_car_health|get_car_health)\\b"
68+
"match": "\\b(jump|terminate_this_script|set_time_scale|set_car_density_multiplier|set_time_of_day|print_help|load_sprite|is_key_pressed|print_string_now|print_big_string|print_formatted|nop|wait|create_car|request_model|has_model_loaded|mark_model_as_no_longer_needed|get_time_of_day|does_char_exist|locate_char_any_means_char_3d|is_player_playing|create_player|load_and_launch_mission|create_object|delete_object|add_blip_for_coord|remove_blip|set_object_coordinates|get_object_coordinates|is_button_pressed|store_car_char_is_in|warp_char_into_car|explode_car|set_car_health|get_car_health)\\b"
6969
}
7070
]
7171
},

src/content/docs/ch01/01-instructions.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ In Sanny Builder each instruction is written on a separate line. An instruction
1111
Let's have a look at the shortest possible script that has only one instruction:
1212

1313
```sb
14-
terminate_this_custom_script
14+
terminate_this_script
1515
```
1616

17-
`terminate_this_custom_script` is the command name. Like all names, it describes what this command does. Even if you never wrote a script before, you can probably guess it. Once the game encounters this command, it will stop executing the script. Without it, the game would try to read the next instruction that doesn't exist and crash.
17+
`terminate_this_script` is the command name. Like all names, it describes what this command does. Even if you never wrote a script before, you can probably guess it. Once the game encounters this command, it will stop executing the script. Without it, the game would try to read the next instruction that doesn't exist and crash.
1818

1919
Sanny Builder knows all available commands and their names. It is done thanks to the information available in Sanny Builder data files. [Sanny Builder Library](https://library.sannybuilder.com) is the website that serves as the source of this information. You can use it to learn more about available commands.

src/content/docs/ch01/05-comments.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ Line comments start with `//` and end with the end of the line. For example:
1010

1111
```sb
1212
// End of script
13-
terminate_this_custom_script
13+
terminate_this_script
1414
```
1515

1616
Or:
1717

1818
```sb
19-
terminate_this_custom_script // End of script
19+
terminate_this_script // End of script
2020
```
2121

2222
Block comments start with `/*` and end with `*/`. They can span multiple lines:

src/content/docs/ch01/06-cleo-directive.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ Sanny Builder will create a basic template for you:
1616
{$CLEO .cs}
1717
nop
1818
19-
terminate_this_custom_script
19+
terminate_this_script
2020
```
2121

22-
Here you can see two commands: `nop` and `terminate_this_custom_script`, one that we saw already. `nop` does nothing, it is just a placeholder, but it comes in handy when using loops. We will discuss them in the next chapter. For now you can simply ignore or delete this line.
22+
Here you can see two commands: `nop` and `terminate_this_script`, one that we saw already. `nop` does nothing, it is just a placeholder, but it comes in handy when using loops. We will discuss them in the next chapter. For now you can simply ignore or delete this line.
2323

2424
The key part here is the first line: `{$CLEO .cs}`. Lines enclosed in `{$...}` are _directives_. They are special commands that alter Sanny Builder's behavior during [compilation](/ch00/03-sanny-builder).
2525

src/content/docs/ch01/07-script-show-message.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ nop
2424
2525
print_string_now "Hello, world!" 2000
2626
27-
terminate_this_custom_script
27+
terminate_this_script
2828
```
2929

3030

src/content/docs/ch02/05-script-spawn-vehicle.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Car cheetah = create_car 415 at 2488.6963 -1660.1608 13.3359
2828
2929
mark_model_as_no_longer_needed 415
3030
31-
terminate_this_custom_script
31+
terminate_this_script
3232
```
3333

3434
The result in game will look like this:

src/content/docs/ch03/02-else.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,6 @@ if is_key_pressed 113 // F2
2626
then
2727
print_help 'HELP_F2' // show message if F2 is pressed
2828
else
29-
terminate_this_custom_script // otherwise terminate the script
29+
terminate_this_script // otherwise terminate the script
3030
end
3131
```

0 commit comments

Comments
 (0)