Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - kimbucktwo

Pages: [1] 2 3 4 5 6 ... 14
1
Help / Can't set BL resolution
« on: August 19, 2013, 01:32:03 PM »
This is a very odd issue I'm faced with - I go to options and there is simply not resolutions to choose from with the drop down menu. I've tried reinstalling Blockland and want to know if anyone has this issue and if there is a fix.



Thanks in advance.

2
Modification Help / Re: What's wrong with my script?
« on: September 29, 2012, 01:43:14 PM »
what is the tagged string 'msgclearbricks' for? why cant that be blank instead? basically... i'm not too sure what tagged strings are and what they're for

3
Modification Help / Re: Very simple kill command, need help
« on: September 24, 2012, 02:34:13 PM »
I don't know if you crossed that out because you unlocked or, or because you remembered you shouldn't. But know that you shouldn't lock threads in coding help just because the question has been answered. Someone may have a better solution or see an issue with the "solution" but they can't give it to you if it's locked.
I don't know how much you tried, but the error report gives you a line number (most text editors allow your to press ctrl+G to go to a certain line) and a general location of the error, you should practice finding and fixing the error yourself.

Also, I don't know what you have now, but in the code in this post, you can get rid of either the return or the else

okay, and with the syntax error, it was a syntax error i was unfamiliar with, but yes i did look thouroughly through the script to look out for one, and the syntax error i did was one i didnt know about

4
Modification Help / Re: Very simple kill command, need help
« on: September 23, 2012, 02:33:33 PM »
it's so you can send a bit of information back out of the function

for example (poor example)

function getNumber1()
{
return 1;
}

function doMaths(%addme)
{
echo(getNumber1() + %addme);
}


then you go in your console and do doMaths(4); and it tells you "5"

in this instance getNumber1() is usable in exactly the same way as the number 1

now think what happens when you use variables and math in the getNumber1() function!

all of a sudden you can do math and stuff outside of your main function, and use your calculations elsewhere! it's a good deal.

i see, thanks :) however i still dont understand why they were used in my short piece of script, when it was all inside one function and didnt need to be used outside of the function

5
Modification Help / Re: Very simple kill command, need help
« on: September 23, 2012, 02:21:44 PM »
you're calling the VARIABLE "getname" on the PLAYER


the player does not have this.

use this instead: messageclient(%client, '',"\c6" @ %client.getPlayerName() @ "\c6 killed you.");

it calls the METHOD (function) called "getPlayerName" on a client, which returns (lets you use) the name.

ahhh it works! thanks for making that clear too, one last thing, why do we use "return;" at the end of some things?

6
Modification Help / Re: Very simple kill command, need help
« on: September 23, 2012, 02:16:19 PM »
You should also replace
Code: [Select]
if(%target $= "")
  {
    messageclient(%client, '',"\c6No target specified.");
  }
with this:
Code: [Select]
if(!isObject(findClientByName(%target).player)){
     messageClient(%client, '', "Invalid target specified.");
     return;
}
Make sure to use findClientByName(%target) and not just %target.

ahhh okay thanks for that adjustment, however when i kill me it just says " killed you" without showing the name of who killed me,
heres my script

Code: [Select]
function servercmdkill(%client, %target)
{
  if(!isObject(findclientbyname(%target).player))
  {
    messageclient(%client,'',"\c6Invalid target specified.");
    return;
  }
  else
  {
    findclientbyname(%target).player.kill();
    messageclient(%client, '',"\c6" @ %client.player.getname @ "\c6 killed you.");
  }
}

7
Modification Help / Re: Very simple kill command, need help
« on: September 23, 2012, 02:00:29 PM »
i've added a bit more to it just for more practice, and there is a syntax error somewhere, but i cant find it

Code: [Select]
function servercmdkill(%client, %target)
{
  if(%target $= "")
  {
    messageclient(%client, '',"\c6No target specified.");
  }
  else
  {
    %killer = %client.player.getname();
    findclientbyname(%target).player.kill();
    messageclient(%client, '',"\c6" @ %killer "\c6 killed you.");
  }
}

8
Modification Help / Re: Very simple kill command, need help
« on: September 23, 2012, 12:07:37 PM »
Your just giving a name to it,
You could name it anything you want but it's still the same value.

ahh okay, locking topic, thanks for help

9
Modification Help / Re: Very simple kill command, need help
« on: September 23, 2012, 12:05:52 PM »
They're just names

isn't %client more than a name? or can you put anything instead of %client in the parenthesis after a servercmd?

10
Modification Help / Re: Very simple kill command, need help
« on: September 23, 2012, 12:01:18 PM »
Code: [Select]
function servercmdKill(%client,%input)
{
  %Target = findclientbyname(%input);
  %Target.player.kill();
}

That's a very, very crude way of doing it.
Code: [Select]
function servercmdkill(%cl, %ta)
{
    if(!%cl.isadmin)
        return;
    findclientbyname(%ta).player.kill();
}

ahhh thank you both! i wasnt far off then, and is there a difference between using %cl and %ta than %client and %target?

11
Modification Help / Very simple kill command, need help
« on: September 23, 2012, 11:51:43 AM »
Obviously i'm very new to scripting, but if anyone can fix this for me, and tell me what i'm doing wrong, it'd be greatly appreciated
Code: [Select]
function servercmdkill(%client, %target)
{
  findclientbyname(%target);
  %target.kill();
}

I have also tried
Code: [Select]
function servercmdkill(%client, %target)
{
  findclientbyname(%target).kill();
}

and
Code: [Select]
function servercmdkill(%client, %target)
{
  findclientbyname(%target);
  %client.kill();
}

12
i mainly want to bump this... but i've been working on a build thats pretty much all brickscaped. i'll probably post it on its own topic in the gallery when its done, but this topic was really useful for it :D

13
General Discussion / Re: Blockland's Kindest players?
« on: August 29, 2012, 05:58:21 AM »
A lot of people on BL are nice and friendly.

whut.

14
General Discussion / Re: Making better servers
« on: August 28, 2012, 01:41:22 PM »
I've had a freebuild up today and yesturday, both times they've been filled with crap >.< today it was even more like a family RP

15
Gallery / Re: Blocktopolis City RPG (Very good news)
« on: August 21, 2012, 07:59:02 PM »
looks good, but there seems to be a trend with all city rpgs that you need to do some kind of labor for a while before you can begin to play properly and get a decent job. If it was me, i would get rid of the slow start, and get straight to the non-labor jobs

Pages: [1] 2 3 4 5 6 ... 14