Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - ThinkInvisible

Pages: 1 ... 66 67 68 69 70 [71] 72 73 74 75 76 77
1051
Modification Help / Re: Filewriting loopcheck and rewrite
« on: August 26, 2010, 11:54:32 PM »
I think you can use this
Code: [Select]
function whatever(%input) //Input is the name of your variable you want changed
{
//fileobjectcreated
//fileobjectopenforwrite
//tolazytodoit
while(!%file.isEOF())
{
%line = %file.readLine();
if(getSubStr(%line,0,1) $= "$")
if(getSubStr(getWord(%line,0),0,strLen(getWord(%line,0))/2) $= strLen(%input)/2)
{
%file.writeLine(%changevariabletowhatever);
break;
}
}
}

I haven't tested it, but i hope the theory of this can help you, or if someone actually knows how to do it a more efficient way, correct me.
That doesn't really work for what i need, as:
-What i REALLY needed, was how to rewrite just that line, even if it is midfile, with a new line.
EDIT : And now that i study the script more closely, wouldn't that make an infinite loop that crashes you? Because i see no incrementing command.

1052
Modification Help / Filewriting loopcheck and rewrite
« on: August 26, 2010, 04:27:34 PM »
I have a clientsided database chat mod, and i need one more thing
I want to, before making the variable, scan the file for the variable being set...
I found how to scan a file elsewhere, but i can't figure out how to find the variable.

So i need to know how to:

A. Scan the file for a certain line. I worked this out, but i REALLY need to know how to write over a line.
B. If the line is found, then it will overwrite the variable on THAT LINE ONLY, nothing else.
C. If it isn't, append the new variable to the bottom of the file(I can do this)

Can someone please answer?

1053
Another problem...

Calling a If statement that tests subStr for something in the ClientCmdChatMessage thing :

if (%msg = getSubStr(%msg,"0","14","Is the number "))
     {bla bla bla}

But for some reason, it never executes 'bla bla bla'

1054
Code: [Select]
function TGG_startup() {($TGGfact1 = "1");##(##$TGGfact2 = "10");  //## around error as usual.{($TGGfact1 = "1");##(##$TGGfact2
"1");##(##$TGGf

What the heck is wrong with that code section?
I'm trying to make a client-sided chat Guessing Game script, and it's epic failing because of that.
By all means, it should work...

(The parentheses were around those statements... It doesn't work even without those.)

1055
Modification Help / Re: string problem
« on: August 09, 2010, 01:32:49 PM »
Add more arguments to the function.
There is another possibility :
%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

Only different :

%name=%message;  //Just %message.
%name=strReplace(%name,"_"," ");  //Notice there's a space there instead of nothing.

This will make it so you type it in with underlines like so:

/I is_testing_this_command.

The code above will replace those underlines with spaces when the code actually executes(if you put it in the right place),
and return the chat as:

"ThinkInvisible is testing this command."

Basic explanation ninja edit!
Blockland / commands don't like extra spaces for one variable. So, you have to change a filler character to spaces later on in the code.

1056
1. Just make a setAccess command that checks if the user can setAccess, and make the database edit commands check for access levels.
-snip-
That.

1057
Works fine for me
Once again, i got it working now.

I still really want to know how to do access key.

1058
Suggestions & Requests / Re: Please make a chinook.
« on: August 07, 2010, 08:08:15 PM »
In words near the start of this post...
'Youre not special enough to request a chopper just for yourself.'
Or something along those lines.

THAT'S THE IDEA OF THIS FORUM. YOU REQUEST IDEAS.
For those noobs who say you can't request in a requestions forum, get the heck off of the internet and go study. And to you trolls insulting him, however unintelligent he may have been or how much of an a-- he may have been, do NOT troll or insult other players because of their requests.

Personally, i think this is an excellent idea. We don't have enough good-handling, smooth-lined choppers.
If someone is making this ATM, please add a space-to-climb script (jamming Space in midair provides lift)

Ninjedit...
Armyguy said : "You are another one of those 'There is already one , but it's not good enough , but I think I am special enough to get someone to make a different one'-idiots.

The one James mentioned is perfect for all your chinook needs."

Who are you to say he can't request something from the good modelers and scripters on blockland?
And the fact that there is already one but it's not good enough are false. Do you see a true Chinook anywhere? I think not.

1059
Suggestions & Requests / Re: Nuclear bomb plane or whatever
« on: August 07, 2010, 08:01:59 PM »
Not really phf...
It was actually a rocket Vehicle that you ride, it flew around crazily (bad handling) until you clicked and it exploded.

1060
Suggestions & Requests / Re: ScriptGUI
« on: August 07, 2010, 08:00:52 PM »
Not a GUI editor, a GUI maker.
Editing is just flipping around another GUI...
and i think you can't really add new elements there.

1061
Suggestions & Requests / ScriptGUI
« on: August 07, 2010, 06:56:14 PM »
A program, located in blockland base folder, that works like a scripting GUI... basically is one.

It allows you to create a new CS file, and then enter your script.
When you click 'Syntax Check' it checks the entire code for errors as it would if it were loading it in an add-on.
A mini simulator window in the corner would be nice too, basically a SinglePlayer server.
Also, auto-enter might be nice : You begin typing a bit of script, and in a window on the right it checks for all functions that have that in their name.

Would be very useful for add-on makers who don't want to have to start a server, see it fail, end server, modify, repeat over and over until it works.

A GUI maker would be quite nice too... i just can't understand all that code about GUIs.

1062
@HCZ:
Your code there doesn't work, first line is error'd.
EDIT - Never mind, got this working.

And i have no idea about the access key thing.

1063
@originalpost:
Now that you mention it, every RP i go to dies down within a maximum of a week, mostly.
The longest-surviving RP i've seen is the Medeival RP, started a couple weeks ago and currently on pause due to host (Sawses) being gone.
Although, most people i RP with have excellent ideas (problems with godmod though) which can keep it alive.

What we really need is some better rules, and IDEAS. Lots, and lots, of IDEAS.
An RP is nothing without a bunch of different events.
(That, and some good RPers.)

1064
1. Just make a setAccess command that checks if the user can setAccess, and make the database edit commands check for access levels.
Right now I'm just taking a breakbeing distracted from writing a paper and I don't want to be too distracted by writing more than a few lines of script

I don't think I quite understand what you mean.
Like "omg 1" doing something different than "omg 2"?
No...
Like "1 + 2" making it say 3, and "1 + 64" making it say 65.
Or like "omg 1" saying "WTFBBQ1" and "omg 2" saying "WTFBBQ2"

Simple variable-result system.

"setAccess command that checks if the user can setAccess, and make the database edit commands check for access levels." Er, how2?

1065
Modification Help / Last request
« on: August 05, 2010, 06:38:13 PM »
Okay, i need one more thing.
I want to restrict rights to using the command...

It needs to:
Be able to set three levels of access: Read|ReadWrite|EditaccessReadWrite
EditaccessReadWrite must be able to change access level of all other players, and edit the database
ReadWrite must be able to edit the database but not access levels
Read must not be able to edit the database or access levels

So basically, i need variables.

Also, how do i include a text variable in the first command
package chatstuff
{
    function serverCmdMessageSent(%client,%message)
    {
        Parent::serverCmdMessageSent(%client,%message);
        if(%message $= "omg")
            messageAll('','wtfbbq');

    }
};
ActivatePackage(chatstuff);

What if i wanted to have a blank spot in there, where it would allow a numeral?

Pages: 1 ... 66 67 68 69 70 [71] 72 73 74 75 76 77