File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff 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
7979unsigned 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```
8989The 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.
You can’t perform that action at this time.
0 commit comments