Author Topic: Printer's Image Name  (Read 1667 times)

EDIT:

Whats the image name for the printer? Because it's not printerImage.
« Last Edit: October 25, 2008, 11:50:07 PM by Truce »

Odd, it looks completely correct. Is there any syntaxes in the console when you start up? Also, what is updateArm? Never seen it.

I'm not a scripter, but shouldn't this:
Code: [Select]
     if (client.isAdmin || client.isSuperAdmin)

Be:
Code: [Select]
     if(%client.isAdmin || %client.isSuperAdmin)
?

Well, honestly, I took the pa

Warning - while you were typing a new reply has been posted. You may wish to review your post.

Ah. Yes, I think you may be right. I'll go try that.

EDIT:
No, nothing seemed to change.
Here's the direct quote from the console (both lines appear when I type /QTHammer):
Quote
base/client/scripts/allClientScripts.cs (17319): Unable to find object: 'NoShiftMoveMap' attempting to call function 'pop'
serverCmdqthammer: Unknown command.
« Last Edit: October 25, 2008, 09:55:07 PM by Truce »

Quote
function serverCmdQTHammer(%client)
{
     if(%client.isAdmin || %client.isSuperAdmin)
     {
          %player = %client.player;
          if(isObject(%player))
          {
               %player.updateArm(hammerImage);
               %player.mountImage(hammerImage,0);   
               messageclient(%client,'','\c2You have equipped the QuickTool \c1Hammer');
          }
     }
     else
     {
          messageclient(%client,'','\c2Sorry, you have to be an \c1Admin \c2or a \c1Super Admin \c2to use the Quicktools.');
     }
}
That works perfectly for me, no errors or anything. Must just be you.
« Last Edit: October 25, 2008, 09:59:40 PM by TheBoltster »

snip

As I was typing I noticed I forgot a semicolon at the end of a line in another part of the script.
I'll go try that and see if it works.

EDIT:
Ahg, nothing changed. Same error.
The other part of the script is this (maybe the error is in here?):

Code: [Select]
function serverCmdQTHelp(%client)
{
     messageclient(%client,'','\c2text.');
     messageclient(%client,'','\c2text.');
     messageclient(%client,'','\c2text.');
     messageclient(%client,'','\c2text.');
}

Also, if I have a client.cs, do I need to execute the server.cs in there? Or vice versa?
« Last Edit: October 25, 2008, 10:11:55 PM by Truce »

That might be your problem, are you putting the script inside a .zip, and 'server.cs'; And with a description.txt file?

E.g.
.Zip name:
Script_QuickTools

Contains:
server.cs <- Script
description.txt

And moreso, are you enabling it in the addons menu?
« Last Edit: October 25, 2008, 10:18:38 PM by TheBoltster »

.zip includes:
server.cs
client.cs
description.txt

Enabled on the addons menu.
.zip is named Script_QuickTools
client.cs is just keybinding. I can post it if you need me to.

Have you put:
Quote
exec("./client.cs");
In your server.cs?

No, but I will now.

EDIT:
Did nothing. I put that line at the top of server.cs.
« Last Edit: October 25, 2008, 10:51:58 PM by Truce »

Have you put:In your server.cs?

If you don't script, why do you post in the coding help forum?

client.cs is always executed as the game starts up, there's no need to re-execute it.

Because I managed to pick up a few syntax errors.

The problem isn't with the client.cs though, it's with the game not recognizing the cmds defined in the server.cs.

Have you put:In your server.cs?
Are you stupid? client.cs is an autoexec file which execs as soon as you start up Blockland, a server.cs is a file that execs when you start a server if it's checked in the add-ons list, or called by another add-on.

Can I see the whole script?

Are you stupid? client.cs is an autoexec file which execs as soon as you start up Blockland, a server.cs is a file that execs when you start a server if it's checked in the add-ons list, or called by another add-on.
Ephis already said that, and I didn't know.