Blockland Forums > Modification Help
Help with Syntax Error in my Delete function
adam savage:
Here is what my console said:
>>> Some error context, with ## on sides of error halt:
function servercmdDelete(%client, %name)
{
if(%client.isadmin)
{
FCBN(%name).player.delete;##
##}
}
>>> Error report complete.
What should be there or not be there?
otto-san:
delete();
also unless FCBN is stated elsewhere it's findclientbynamev
Headcrab Zombie:
--- Quote from: otto-san on July 18, 2011, 07:09:19 PM ---also unless FCBN is stated elsewhere it's findclientbynamev
--- End quote ---
Except without the v at the end
adam savage:
I know FCBN works because I changed my sisters clan tag with it, It was FCBN(Marti).ClanSuffix = ("Cube");
Katadeus:
I am by no means an expert, but it sounds right about changing FCBN.
Another thing that you could do is this.
function servercmdDelete(%client, %name)
{
if(%client.isAdmin)
{
findclientbyname(%name);
%name.player.delete();
}
}
I believe you were missing the parentheses after delete, and that is also a problem.