|
| 29 Dec 2013 01:48 PM |
function twoPlusTwo() x = 2 + 2 print(x) end twoPlusTwo()
----------------------------
How do i "call" for this to work? |
|
|
| Report Abuse |
|
|
|
| 29 Dec 2013 01:48 PM |
| Sorry for being a noob, but just please help. |
|
|
| Report Abuse |
|
|
|
| 29 Dec 2013 01:48 PM |
That's how you do it.
twoPlusTwo() |
|
|
| Report Abuse |
|
|
|
| 29 Dec 2013 01:49 PM |
In what? chat? Command? how do i do it?
|
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 29 Dec 2013 01:50 PM |
| In a script object or in the command bar. |
|
|
| Report Abuse |
|
|
|
| 29 Dec 2013 01:51 PM |
| You can copy and paste it in the Command Bar, then press enter or you can put it in a Script and press the green Play arrow button. |
|
|
| Report Abuse |
|
|
|
| 29 Dec 2013 01:51 PM |
| Once i enter it into the command bar what should happen? -_- this maks me seem so stupid. |
|
|
| Report Abuse |
|
|
|
| 29 Dec 2013 01:52 PM |
| You can also call the function with "Events", but that is a bit more complicated. Read the Wiki to learn about Events. |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 29 Dec 2013 01:53 PM |
| It should show "4" in the output |
|
|
| Report Abuse |
|
|
|
| 29 Dec 2013 01:53 PM |
| Also, make sure you have the Output window open. When you run that in the command bar you should see "4" in the Output window. |
|
|
| Report Abuse |
|
|
Kingmouli
|
  |
| Joined: 28 Sep 2012 |
| Total Posts: 1292 |
|
|
| 29 Dec 2013 01:55 PM |
To call it you just need to say twoPlusTwo() in the script and the function will run when the script will run.
~Kingmouli, King of the Mouli~ |
|
|
| Report Abuse |
|
|
|
| 29 Dec 2013 01:58 PM |
| Thanks guys, I will be back >:D |
|
|
| Report Abuse |
|
|