Blockland Forums > Modification Help
What does this error message actually mean?
Headcrab Zombie:
No, %client is not optional
--- Code: ---function serverCmdTestinvc(%client)
{
%client.player.setInvincibleMode(1.0,0.2);
}
--- End code ---
You may get an error with this still, but a different error. setInvincibleMode is not a default function, so if that's not defined somewhere it won't work
Placid:
--- Quote from: wizzlemanizzle on September 11, 2011, 06:26:03 PM ---
--- Code: ---//I am pretty sure %client is optional in here, but I tested with and without.
--- End code ---
--- End quote ---
--- Quote from: Headcrab Zombie on September 11, 2011, 06:33:59 PM ---No, %client is not optional
--- End quote ---
because if you're going to use a function that includes %client and it's never defined then it won't know what it's doing.
wizzlemanizzle:
--- Quote from: Headcrab Zombie on September 11, 2011, 06:33:59 PM ---No, %client is not optional
--- Code: ---function serverCmdTestinvc(%client)
{
%client.player.setInvincibleMode(1.0,0.2);
}
--- End code ---
You may get an error with this still, but a different error. setInvincibleMode is not a default function, so if that's not defined somewhere it won't work
--- End quote ---
nope, I get the same error I described above, trust me, either way, I heard that setInvincibleMode was default, but even if I was wrong about that, dump(); is default isn't it?
why is it that
--- Code: ---function ServerCmddumperoo(%client)
{
%client.dump();
}
--- End code ---
gives me
unable to find object: ' ' attempting to call function 'dump'
with serverCmds the firstvar is the client calling it right? its been a while since I have done any coding, but I don't think I remembered THAT wrong...
Headcrab Zombie:
You're doing something wrong then, because their is nothing wrong with either of those functions.
The only thing I can think of is that you're trying to call the function by typing 'serverCmdTestinvc();' on the console
wizzlemanizzle:
--- Quote from: Headcrab Zombie on September 11, 2011, 07:13:00 PM ---You're doing something wrong then, because their is nothing wrong with either of those functions.
The only thing I can think of is that you're trying to call the function by typing 'serverCmdTestinvc();' on the console
--- End quote ---
nope, I did both
commandtoserver(Testinvc());
AND typed /Testinvc into chat
neither works.
Have you tried them on your copy of Blockland? Maybe they were locked? Should I redownload or something?