it needs to have Item at the end of it.
What makes you believe that? If that were the case and you use your function to do
/addSword SwordItem as it seems to be intended then the SwordItem will be lost, because that makes
%argument = SwordItem; when doing the command, and doesn't set
%argumentItem to anything at all. If you wish to test this out for yourself you can do something like this:
function serverCmdItemTest(%client,%argument){messageClient(%client,'',%argument NL %argumentItem);}Which is ready to be copied and pasted into your console. Then do
/test Sword and you'll get the message:
Sword
Add-Ons/Server_thing/server.cs (449): Unable to find object: 'Item' attempting to call function 'getid'
That's because Item isn't an object, nor did you make it a variable. If you wish to tag a string to the end of that variable then you'd need to put it in quotes.