| Blockland Forums > Modification Help |
| Need help with input! |
| (1/5) > >> |
| I-have-not:
Hai, I need help figuring this out: If I were to have someone who uses a function I'm creating enter input for something, how would I have the function know to want input for how the function will execute itself? Here's what I'm thinking : when someone types uploadAddonmanual <add-on name>, how would I have them enter the add-on's name so the function knows what to find? Thanks in advance, -I have not |
| Swollow:
Like a server command? function ServercmduploadAddonmanual(%Client,%AddonName) { //Stuff } |
| Nexus:
Not sure if I 100% understand, but... All the input for a function is contained within arguments function examplefunction(%argument1, %argument2, %argument3, ... ) Each of the %arguments is an input. You can send your input when you call the function like so: --- Code: ---examplefunction("input 1", "input 2", "input 3"); --- End code --- Is that what you would like to know? |
| jes00:
Is this what you want? I'm not sure I understand what you are asking. --- Code: ---function serverCmdUploadAddonManual(%client, %addOnName) { exec("add-ons/" @ %addOnName @ "/server.cs"); } --- End code --- |
| Swollow:
--- Quote from: jes00 on January 26, 2012, 06:51:18 AM ---Is this what you want? I'm not sure I understand what you are asking. --- Code: ---function serverCmdUploadAddonManual(%client, %addOnName) { exec("add-ons/" @ %addOnName @ "/server.cs"); } --- End code --- --- End quote --- he said "Addon Manual" so I think we can assume that its not the server.cs |
| Navigation |
| Message Index |
| Next page |