| Blockland Forums > Modification Help |
| Adding onto the annoying scripting. |
| (1/1) |
| Jetpuff:
(haha get it... adding) Trying to message in someone's server something like Jetpuff: Did you know 23 + 64 = 87? Drakorp: What? Jetpuff: Did you know 15 + 24 = 39? Drakorp: Shut up Jet.... Here is what I have been trying funciton Add(%x,%y) { %x=getrandom(1,100); %y=getrandom(1,100); %z=%x+%y; return(%z); } commandtoserver('messagesent', "Did you know" SPC %x SPC "+" SPC %y SPC "=" SPC Add(%x,%y)); However %x and %y are left blank in the message, but Add still shows. I tried making y(); and x(); functions that getrandom and then making them equal the variables in the Add function. Then changing 'messagesent', ...x()...y()... "=" SPC Add(%x,%y)); And then when it showed the numbers I was like "OHHHHHH!!!! oh dammit" since x() and y() just get random numbers the math wasn't right haha. Someone please help :( |
| phflack:
try function Add() { %x = getrandom(1, 100); %y = getrandom(1, 100); commandtoserver('messagesent', "Did you know that " @ %x @ " + " @ %y @ " = " @ %x + %y @ "?"); } then to use, type Add(); in the console |
| Jetpuff:
Wow nevermind, I am an idiot haha. Sorry I guess I thought you could only use functions or text in commandtoserver. |
| Navigation |
| Message Index |