Blockland Forums > Modification Help
/command
Obibital:
--- Quote from: SpreadsPlague on July 20, 2010, 11:23:04 AM ---nope, needs to be in add-on format or you can type it directly into the console
function servercmdtest() { echo("working"); }
doesn't work like that
no
--- End quote ---
Ok, i was just trying to find a way to shorten the amount of time it took to edit it
So, i mostly just need to re .zip it everytime i edit and then exec("blahblahblah") in the console?
SpreadsPlague:
--- Quote from: Obibital on July 20, 2010, 11:31:36 AM ---Ok, i was just trying to find a way to shorten the amount of time it took to edit it
So, i mostly just need to re .zip it everytime i edit and then exec("blahblahblah") in the console?
--- End quote ---
pretty much, but if it's short enough, typing it into the console would be faster
ignore me
nanoviro:
From the way I have been experimenting with mods you don't need to zip it unless you are done with it. I have found it much easier to open scripts in Dreamweaver edit it, hit Ctrl + S to save, and then go straight to my Blockland window open console and type
exec("add-ons/(addon name)/server.cs"); If you do plan to do this make sure it doesn't have a model (for future reference) or it will kick all clients off your server with an invalid packet error. I hope this was informative and not a waste of time to read.
P.S. after you execute it once in the console if your planning to edit and save again you can use the up arrow key to go back to your previous console command.
Headcrab Zombie:
Yeah you don't need the zip, just but everything in the same format as if it were a zip (description.txt, server.cs, etc)
Obibital:
--- Quote from: nanoviro on July 20, 2010, 11:41:43 AM ---From the way I have been experimenting with mods you don't need to zip it unless you are done with it. I have found it much easier to open scripts in Dreamweaver edit it, hit Ctrl + S to save, and then go straight to my Blockland window open console and type
exec("add-ons/(addon name)/server.cs"); If you do plan to do this make sure it doesn't have a model (for future reference) or it will kick all clients off your server with an invalid packet error. I hope this was informative and not a waste of time to read.
P.S. after you execute it once in the console if your planning to edit and save again you can use the up arrow key to go back to your previous console command.
--- End quote ---
Did that exactly, But i didnt check the box in add-ons becuase i think that exec does that.
when i execute it it just shows me the entire code and says theres an error of some kind
--- Quote from: SpreadsPlague on July 20, 2010, 10:49:56 AM ---%client is always your client,
%obj is an object,
here's a terrible example using arguments
--- Code: ---function servercmdcompare(%a, %b)
{
if(%a == %b)
return;
else
commandtoserver('Self Delete');
}
--- End code ---
/compare X Y would then compare X to Y
if X == Y then the script does nothing and everyone is happy
however if X != Y then you die
arguments can be used in lots of ways but unfortunately I'm too tired to remember any
sorry.. so here's a helpful tip instead
= sets a variable to something
== means is equal to
%a = 1
this sets %a to 1
if(%a == 1)
this means "if %a is 1"
I hope this post helps you somehow ..
--- End quote ---
Most of that is helpful thanks :D
Some i know from AS2 like the = is set to and the == is checking.
So basically if you want to do anything with values in functions, you need to state which values will be used?
(Im pretty sure that an argument is a value, am i correct?)