Blockland Forums > Modification Help

Is there a way to multiply together the output of a loop?

Pages: << < (3/4) > >>

Uristqwerty:

^ is a bitwise XOR.

You want mPow(a, b) (where a and b are replaced with numbers).

a @ b joins a and b as a string, SPC does the dame thing with a space between them, TAB with a tab, and NL with a newline.

{}s must be used when declaring a function or package, may be used during a new statement to set specific values for the created object, can be used with if, while, and for to allow any number of statements rather than exactly one, and is generally a syntax error otherwise. I might have missed a few valid uses.

Jetpuff:

K put in some @ signs, Still a syntax error...


function serverCmdAdd(%client, %x, %y)
 {
  %sum=%x+%y;
  messageClient(%client, '', %x @ "+" @ %y @ "=" @ %sum);
 }

Also if it helps, I want something to type in like

/Add 2 2

and then the message will say something like

2+2=4

Are you not allowed to use two variables (excluding %client) in a serverCmd function?

Chrono:

You're allowed to use as many as you like.

Show the entire code, because the syntax error is likely before the add function.

Jetpuff:

I read it in in console, still the same as what I posted.

Chrono:

The console will not show what is causing the problem.

It just shows you where it realized there's a problem.

Pages: << < (3/4) > >>

Go to full version