Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script>
- <variable name="x" value="'Bob'" />
- <function name="func">
- <parameters>
- <parameter>x</parameter>
- </parameters>
- <body>
- <call function="print">
- <argument>"hey " .. x</argument>
- </call>
- <if-statement>
- <if>
- <checks>
- <check operator="or" lefthand="x" comparator="==" righthand="5"/>
- <check operator="or" lefthand="x" comparator="==" righthand="y"/>
- </checks>
- <body>
- <call function="print">
- <argument>"hey it's a 5!"</argument>
- </call>
- </body>
- </if>
- <elseif>
- <checks>
- <check operator="or" lefthand="x" comparator="<" righthand="5"/>
- </checks>
- <body>
- <call function="print">
- <argument>"hey it's lower than 5!"</argument>
- </call>
- </body>
- </elseif>
- <else>
- <body>
- <call function="print">
- <argument>"hey it's nothing I know!"</argument>
- </call>
- </body>
- </else>
- </if-statement>
- <for-loop variable="i" start="1" end="10" increments="1">
- <body>
- <call function="print">
- <argument>i</argument>
- </call>
- </body>
- </for-loop>
- <pairs-loop key="key" value="value" variable="{1, 2, 3}">
- <body>
- <call function="print">
- <argument>key .. ":" .. value</argument>
- </call>
- </body>
- </pairs-loop>
- </body>
- </function>
- <call function="func">
- <argument>x</argument>
- </call>
- <call function="func">
- <argument>5</argument>
- </call>
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement