| Blockland Forums > Modification Help |
| My chatbot is not working |
| << < (21/23) > >> |
| Ipquarx:
--- Quote from: Deoxys And One Noob on May 05, 2012, 07:39:46 AM ---ok. So, its a variable that is server sided %client is client-sided! Got it. Thanks --- End quote --- No, that's not correct. The variable can be named anything, it could be named %lkgjlkdb["asdfasdf"] for all torque cares. It represents the instance of the class that the function is being called on. For example: %a.doStuff(); the first argument in that function will be set to %a. |
| Slicks555:
--- Quote from: Ipquarx on May 05, 2012, 09:38:44 AM ---it could be named %lkgjlkdb["asdfasdf"] --- End quote --- ehhhh torque wouldn't accept that as an argument but the gist of what you say goes through |
| Lugnut:
--- Quote from: Slicks555 on May 05, 2012, 03:47:20 PM ---ehhhh torque wouldn't accept that as an argument but the gist of what you say goes through --- End quote --- it actually will, it's an array (which you probably know) which would turn out as this: %lkgjlkdbasdfasdf |
| Ipquarx:
--- Quote from: Lugnut1206 on May 05, 2012, 03:57:04 PM ---it actually will, it's an array (which you probably know) which would turn out as this: %lkgjlkdbasdfasdf --- End quote --- YOu can even use any charachter that blockland supports, like €£¥#%^*+=?, and as long as you put those characters in array brackets, it will work. you can even use spaces. Function inputs can also be used to automatically set global variables. ie Function setGlobal($stuff, $otherstuff){} Will set the two inputs to the global variables stuff and otherstuff, respectively. Although I'm not sure if you can do things like Function createarrayinarguments(%a, %array[%a]), can anyone tell me if that's valid? Or try it? |
| Slicks555:
--- Quote from: Lugnut1206 on May 05, 2012, 03:57:04 PM ---it actually will, it's an array (which you probably know) which would turn out as this: %lkgjlkdbasdfasdf --- End quote --- Torque doesn't accept arrays as arguments to functions. |
| Navigation |
| Message Index |
| Next page |
| Previous page |