| Blockland Forums > Modification Help |
| Wallet's Scripting Class episode III: Revenge of the Script |
| << < (14/23) > >> |
| Mr. Wallet:
Thanks for contributing to the topic. |
| Uxie:
Hey can someone help me with my homework? Sure yeah I missed out all those days, but reading over the docs helps. So I'm on day 1's homework and I'm getting a syntax error. function test() { $var1 = "Hello world!"; { echo("$var1"); } } }; function test() { ^$var1 = "Hello world!"; ^{## ## ^^echo("$var1"); ^^} ^} }; Basicly I'm trying to get test() to echo $var1. |
| PVC Potato Gun:
You only need one set of brackets for starters. |
| Uxie:
--- Quote from: PVC Potato Gun on July 18, 2011, 10:43:44 AM ---You only need one set of brackets for starters. --- End quote --- What? So you mean like function test() { %var1 = "Hello world!"; echo(%var1) } ? I tweaked it up a bit. And this doesn't work. |
| Mr. Wallet:
Yep. Also, you need a semicolon after your echo call. |
| Navigation |
| Message Index |
| Next page |
| Previous page |