| Blockland Forums > Help |
| What command activates addons in a dedicated server? |
| << < (2/4) > >> |
| Block1zilla:
Could you post the commands that it would need? Like so I could copy/paste 'em |
| Kalphiter:
--- Quote from: Block1zilla on November 08, 2012, 07:21:01 PM ---Could you post the commands that it would need? Like so I could copy/paste 'em --- End quote --- Situational (read above): --- Code: ---discoverFile("add-ons/weapon_musket.zip"); --- End code --- Always needed: --- Code: ---exec("add-ons/weapon_musket/server.cs"); transmitDatablocks(); --- End code --- I made a mistake with discoverFile a few posts up, excuse me for that. "Discovering" the file tells Blockland to treat the files of the ZIP as if it were a folder, and also to update them if the ZIP if they were changed. |
| Dglider:
Thanks Kalphiter! This will make fine tuning addons alot easier. |
| Kalphiter:
--- Quote from: Dglider on November 08, 2012, 07:55:38 PM ---Thanks Kalphiter! This will make fine tuning addons alot easier. --- End quote --- Another trick you should know is the "journal" argument for execution. It's done by adding a 1 in the "exec" function. By using it, you can update functions and variables without any functions in the script actually running. I'll also demonstrate how it works with code. --- Code: ---$lolvariable = 9001; function lolfunction() { echo("noodles"); } lolfunction(); --- End code --- --- Code: ---exec("thefile.cs"); --- End code --- $lolvariables is set to 9001 The function "lolfunction" will be changed if it's different "noodles" is printed --- Code: ---exec("thefile.cs", 1); --- End code --- $lolvariables is set to 9001 The function "lolfunction" will be changed if it's different "noodles" is not printed |
| Cnaibedoge:
--- Quote from: Kalphiter on November 08, 2012, 07:06:10 PM ---You mean to execute an add-on? This step if you just added or updated the add-on: --- Code: ---discoverFile("add-ons/addon_name/server.cs"); --- End code --- --- End quote --- dammit thanks, Kalph, I didn't even know that existed. |
| Navigation |
| Message Index |
| Next page |
| Previous page |