Author Topic: setPrint  (Read 1870 times)

Well I am working on a new event called SetPrint, and it sets a print on a print brick to the letter typed in. My code doesn't syntax, but it doesn't work either, it says this in the console:
Code: [Select]
fxDTSBrick::setPrint - wrong number of arguments.
usage: (int printID)
In the console, I type: (objectId).setPrint(random number) and it works. Now I don't know what to do to make it work in the script, I've tried alot of things, so I'll post my code here. Also, I would like to know how to check if the brick is a print brick, In the code you'll see I tried something, but it doesn't work either. Here's the code:
Code: [Select]
function fxdtsbrick::Setprint(%obj, %print)
{
if(%Obj.getdatablock()!=BrickPrintData.getid())
return;
%obj.setprint($printNameTable["Letters_Default/"@%print]);
}
registerOutputEvent(fxdtsbrick,setPrint,"string 11 30");
Please help!
« Last Edit: March 28, 2009, 05:38:38 PM by AGlass0fMilk »

Why are you making a "print" function and a "setPrint" event?

Is there one? You can set the prints to Letters


Why is no one answering me???
Just kidding about the free icecream part but thanks for reading =D
« Last Edit: March 27, 2009, 09:27:31 PM by AGlass0fMilk »

Why is no one answering me???
Just kidding about the free icecream part but thanks for reading =D
You are an impatient forget aren't you?

Impatient: Yes
forget:No
By the way, did you really read this post to get icecream? Or did you post in it for the slight self-esteem boost that I know you get by making fun of others?

Impatient: Yes
forget:No
By the way, did you really read this post to get icecream? Or did you post in it for the slight self-esteem boost that I know you get by making fun of others?
Your own ignorance has blinded you, Three posts in a row within two hours is quite sad. Imagine if every person posted "K help? "Anyone?" "K now what?" "HELLO!?!" within two hours instead of you.

I see no ignorance.

Conversation Over

I see no ignorance.

Conversation Over

Why is no one answering me???
Just kidding about the free icecream part but thanks for reading =D

Hello?

Is there one? You can set the prints to Letters

Now not only do I believe you as ignorant but as well mentally handicapped.

Prints do not work by filename. They work by ID. Hence why it says you need an int and not a string in the error message. I'm sure there is a random function out there that gets a print ID by file name

Well, I looked at the Dice script for this so maybe it needs to be in the same zip as the default letters? And what other advice do you have?

Well, I looked at the Dice script for this so maybe it needs to be in the same zip as the default letters? And what other advice do you have?
Uh, figure out the IDs of the prints? I gave you the answer.

I figured that out myself yesterday, and when you have more prints, the ID numbers change. So does anyone else have advice?

I'm going to work on something else, but if you have an idea of what that find print by file name function is, please post or PM me, thanks.