Skip to content

Commit 7f64a5d

Browse files
committed
docs: Update block section docs
1 parent 6c4d86b commit 7f64a5d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/Block sections.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,17 +74,17 @@ void MySection::compileHelloWorld(Compiler *compiler) {
7474
}
7575
```
7676
77-
The value of the input can be read during runtime using the \link libscratchcpp::VirtualMachine::getArg() getArg() \endlink function:
77+
The value of the input can be read during runtime using the \link libscratchcpp::VirtualMachine::getInput() getInput() \endlink function:
7878
```cpp
7979
unsigned int MySection::helloWorld(VirtualMachine *vm) {
80-
std::cout << "Hello, " << vm->getArg(0, 1)->toString() << "!" << std::endl;
80+
std::cout << "Hello, " << vm->getInput(0, 1)->toString() << "!" << std::endl;
8181
return 1;
8282
}
8383
```
8484
\note The order of the inputs is the same as in the compile function. Do not use the `Inputs` enumeration in runtime functions.
8585

8686
```cpp
87-
vm->getArg(0, 1)
87+
vm->getInput(0, 1)
8888
```
8989
The first argument is the index of the input and the second argument is the amount of inputs.
9090
\note Make sure to return the amount of inputs in the `helloWorld` function.

0 commit comments

Comments
 (0)