-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample.bs
More file actions
56 lines (44 loc) · 1015 Bytes
/
example.bs
File metadata and controls
56 lines (44 loc) · 1015 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
global funny_name = "Current Daytick: ";
global daytick = getWorldTime();
global important_numbers = [1, 5, 1783, 47823785.7215, 0];
global exciting_lookup = {"pipe": "lordofpipes"};
local cool_number;
function TICK() {
print(getWorldTime());
};
function setVariable() {
cool_number<@s> = 45;
};
function hardCodeExample() {
hardcode 0 to 10 as i {
print(i);
};
};
function jsLikeLoopExample(range) {
for i = 0 with i += 1 while i < range {
print(i);
};
};
function inLoopExample() {
for item in important_numbers {
print(item);
};
};
function helperExample() {
print(helperFunction());
};
function helperFunction() {
return "Haha. Lustig";
};
function lookupAlias(name) {
if name in exciting_lookup {
print(exciting_lookup[name]);
} else {
print("(S)he does not exist");
};
};
function testprintF() {
printf("Hello &l%s. Press &k to walk!", <@s>, "idk.keybind");
printf("Your cool Score is: %v", cool_number<@s>);
var testString = sprintf("Test Advancement: %t", ["", ""]);
};