Author Topic: Take off the _ from a name?  (Read 1578 times)

No. Don't try talking about things you know nothing about; it only confuses people.

Use this:

Code: [Select]
if(%name $= "")
     %brick.setName("");
else
     %brick.setNTObjectName(%name);

Thanks truce! :D

Look at me: More questions.


Is it possible to clone the events of one brick and put it in another brick via scripting?


« Last Edit: August 05, 2010, 02:18:40 AM by Pew446 »

I'm unsure.

I've never worked with events through scripts.

I'm unsure.

I've never worked with events through scripts.

Ah. Ok.

%name=%brick.getName();

%name=strReplace(%name,"_","");

this will change all _ in the string, into nothing and will return John.

u can change it into different things, for ex:

%name=strReplace(%name,"_","*");

that will return *John
I hate you. You are terrible at coding.

MORE QUESTION!!! Alright. This one is simple, but idk.

How do I set a client variable that can be used in every function in the script? I tried %client.var = "lol"; but it only works in the one function.

That should work just fine.


That should work just fine.

Oh. I was using it wrong or something. Anyways thanks.