Closed Thread
Page 221 of 353 FirstFirst ... 121171211219220221222223231271321 ... LastLast
Results 2,201 to 2,210 of 3521
Like Tree5Likes

Thread: Expression Gate 2

  1. #2201
    Wire Sofaking ZeikJT's Avatar
    Join Date
    Dec 2008
    Location
    California
    Posts
    1,391

    Default Re: Expression Gate 2

    Quote Originally Posted by kjiad View Post
    Why? --> gmod patch 56: "file.Write can no longer write to sub folders"

    Unable to save new dupes or expressions!
    I already made a thread for this: http://www.wiremod.com/forum/help-su...html#post80866
    garry said he would undo this for tomorow (dunno how long it will take to apply).

    Until then your gmod is screwed up, all file writes to sub folders become one long filename: file.Wire("folder/path/file.txt", "stuff") writes: folder_path_file.txt in the data folder. So you can save stuff but opening files will fail for newly saved things as they will not be in the adv dupe folder.
    Against stupidity the Gods themselves contend in vain.
    -Friedrich Schiller

    The flame puts me in the mood to "Do it!".
    -Dart, Legend of Dragoon

  2. #2202
    Wire Sofaking Captain Maim's Avatar
    Join Date
    Aug 2008
    Posts
    528

    Default Re: Expression Gate 2

    I can't save anything in my E2 editor anymore for reasons I dont' understand.
    I had an
    if () {selfDestruct()}
    in there that I had forgotten to finish. That was the only chip error.


    Code:
    The following error has occured: Unexpected token found (rpa), please report this to me@syranide.com at line 23, char 4
    
    Trace: 
    	1: Line 32	"Trace"	includes/extensions/debug.lua
    	2: Line 15	"error"	autorun/shared/StargateExtras.lua
    	3: Line 550	"Error"	entities\gmod_wire_expression2\core/init.lua
    	4: Line 1165	"(null)"	entities\gmod_wire_expression2\core/init.lua
    	5: Line -1	""	(tail call)
    	6: Line -1	""	(tail call)
    	7: Line -1	""	(tail call)
    	8: Line -1	""	(tail call)
    	9: Line 924	"(null)"	entities\gmod_wire_expression2\core/init.lua
    	10: Line -1	""	(tail call)
    	11: Line 636	"(null)"	entities\gmod_wire_expression2\core/init.lua
    	12: Line -1	""	(tail call)
    	13: Line 636	"(null)"	entities\gmod_wire_expression2\core/init.lua
    	14: Line -1	""	(tail call)
    	15: Line 636	"(null)"	entities\gmod_wire_expression2\core/init.lua
    	16: Line -1	""	(tail call)
    	17: Line 636	"(null)"	entities\gmod_wire_expression2\core/init.lua
    	18: Line -1	""	(tail call)
    	19: Line 636	"(null)"	entities\gmod_wire_expression2\core/init.lua
    	20: Line -1	""	(tail call)
    	21: Line 636	"(null)"	entities\gmod_wire_expression2\core/init.lua
    	22: Line -1	""	(tail call)
    	23: Line 636	"(null)"	entities\gmod_wire_expression2\core/init.lua
    	24: Line -1	""	(tail call)
    	25: Line 861	"(null)"	entities\gmod_wire_expression2\core/init.lua
    	26: Line -1	""	(tail call)
    	27: Line 784	"IfCond"	entities\gmod_wire_expression2\core/init.lua
    	28: Line 691	"Stmt1"	entities\gmod_wire_expression2\core/init.lua
    	29: Line 673	"(null)"	entities\gmod_wire_expression2\core/init.lua
    	30: Line -1	""	(tail call)
    	31: Line 562	"(null)"	entities\gmod_wire_expression2\core/init.lua
    32	C function
    	33: Line 543	"Execute"	entities\gmod_wire_expression2\core/init.lua
    	34: Line 28	"wire_expression_validate"	entities/gmod_wire_expression2/cl_init.lua
    	35: Line 485	"Validate"	autorun/wire_expression2_editor.lua
    	36: Line 551	"SetCode"	autorun/wire_expression2_editor.lua
    	37: Line 595	"LoadFile"	autorun/wire_expression2_editor.lua
    	38: Line 315	"OnFileClick"	autorun/wire_expression2_editor.lua
    	39: Line 81	"DoClick"	autorun/wire_expression2_browser.lua
    	40: Line 64	"InternalDoClick"	vgui/DTree_Node.lua
    	41: Line 38	"(null)"	vgui/DTree_Node.lua
    42	C function
    	43: Line 169	"PCallError"	includes\util.lua
    	44: Line 83	"(null)"	vgui/DButton.lua
    
    
    The exact error was: The following error has occured: Unexpected token found (rpa), please report this to me@syranide.com at line 23, char 4
    
    Trace: 
    	1: Line 32	"Trace"	includes/extensions/debug.lua
    	2: Line 15	"errorHalt"	autorun/shared/StargateExtras.lua
    	3: Line 17	"error"	autorun/shared/StargateExtras.lua
    	4: Line 550	"Error"	entities\gmod_wire_expression2\core/init.lua
    	5: Line 1165	"(null)"	entities\gmod_wire_expression2\core/init.lua
    	6: Line -1	""	(tail call)
    	7: Line -1	""	(tail call)
    	8: Line -1	""	(tail call)
    	9: Line -1	""	(tail call)
    	10: Line 924	"(null)"	entities\gmod_wire_expression2\core/init.lua
    	11: Line -1	""	(tail call)
    	12: Line 636	"(null)"	entities\gmod_wire_expression2\core/init.lua
    	13: Line -1	""	(tail call)
    	14: Line 636	"(null)"	entities\gmod_wire_expression2\core/init.lua
    	15: Line -1	""	(tail call)
    	16: Line 636	"(null)"	entities\gmod_wire_expression2\core/init.lua
    	17: Line -1	""	(tail call)
    	18: Line 636	"(null)"	entities\gmod_wire_expression2\core/init.lua
    	19: Line -1	""	(tail call)
    	20: Line 636	"(null)"	entities\gmod_wire_expression2\core/init.lua
    	21: Line -1	""	(tail call)
    	22: Line 636	"(null)"	entities\gmod_wire_expression2\core/init.lua
    	23: Line -1	""	(tail call)
    	24: Line 636	"(null)"	entities\gmod_wire_expression2\core/init.lua
    	25: Line -1	""	(tail call)
    	26: Line 861	"(null)"	entities\gmod_wire_expression2\core/init.lua
    	27: Line -1	""	(tail call)
    	28: Line 784	"IfCond"	entities\gmod_wire_expression2\core/init.lua
    	29: Line 691	"Stmt1"	entities\gmod_wire_expression2\core/init.lua
    	30: Line 673	"(null)"	entities\gmod_wire_expression2\core/init.lua
    	31: Line -1	""	(tail call)
    	32: Line 562	"(null)"	entities\gmod_wire_expression2\core/init.lua
    33	C function
    	34: Line 543	"Execute"	entities\gmod_wire_expression2\core/init.lua
    	35: Line 28	"wire_expression_validate"	entities/gmod_wire_expression2/cl_init.lua
    	36: Line 485	"Validate"	autorun/wire_expression2_editor.lua
    	37: Line 551	"SetCode"	autorun/wire_expression2_editor.lua
    	38: Line 595	"LoadFile"	autorun/wire_expression2_editor.lua
    	39: Line 315	"OnFileClick"	autorun/wire_expression2_editor.lua
    	40: Line 81	"DoClick"	autorun/wire_expression2_browser.lua
    	41: Line 64	"InternalDoClick"	vgui/DTree_Node.lua
    	42: Line 38	"(null)"	vgui/DTree_Node.lua
    43	C function
    	44: Line 169	"PCallError"	includes\util.lua
    	45: Line 83	"(null)"	vgui/DButton.lua
    
    
    The exact error was: The following error has occured: Unexpected token found (rpa), please report this to me@syranide.com at line 23, char 4
    
    Trace: 
    	1: Line 32	"Trace"	includes/extensions/debug.lua
    	2: Line 15	"errorHalt"	autorun/shared/StargateExtras.lua
    	3: Line 17	"errorHalt"	autorun/shared/StargateExtras.lua
    	4: Line 17	"error"	autorun/shared/StargateExtras.lua
    	5: Line 550	"Error"	entities\gmod_wire_expression2\core/init.lua
    	6: Line 1165	"(null)"	entities\gmod_wire_expression2\core/init.lua
    	7: Line -1	""	(tail call)
    	8: Line -1	""	(tail call)
    	9: Line -1	""	(tail call)
    	10: Line -1	""	(tail call)
    	11: Line 924	"(null)"	entities\gmod_wire_expression2\core/init.lua
    	12: Line -1	""	(tail call)
    	13: Line 636	"(null)"	entities\gmod_wire_expression2\core/init.lua
    	14: Line -1	""	(tail call)
    	15: Line 636	"(null)"	entities\gmod_wire_expression2\core/init.lua
    	16: Line -1	""	(tail call)
    	17: Line 636	"(null)"	entities\gmod_wire_expression2\core/init.lua
    	18: Line -1	""	(tail call)
    	19: Line 636	"(null)"	entities\gmod_wire_expression2\core/init.lua
    	20: Line -1	""	(tail call)
    	21: Line 636	"(null)"	entities\gmod_wire_expression2\core/init.lua
    	22: Line -1	""	(tail call)
    	23: Line 636	"(null)"	entities\gmod_wire_expression2\core/init.lua
    	24: Line -1	""	(tail call)
    	25: Line 636	"(null)"	entities\gmod_wire_expression2\core/init.lua
    	26: Line -1	""	(tail call)
    	27: Line 861	"(null)"	entities\gmod_wire_expression2\core/init.lua
    	28: Line -1	""	(tail call)
    	29: Line 784	"IfCond"	entities\gmod_wire_expression2\core/init.lua
    	30: Line 691	"Stmt1"	entities\gmod_wire_expression2\core/init.lua
    	31: Line 673	"(null)"	entities\gmod_wire_expression2\core/init.lua
    	32: Line -1	""	(tail call)
    	33: Line 562	"(null)"	entities\gmod_wire_expression2\core/init.lua
    34	C function
    	35: Line 543	"Execute"	entities\gmod_wire_expression2\core/init.lua
    	36: Line 28	"wire_expression_validate"	entities/gmod_wire_expression2/cl_init.lua
    	37: Line 485	"Validate"	autorun/wire_expression2_editor.lua
    	38: Line 551	"SetCode"	autorun/wire_expression2_editor.lua
    	39: Line 595	"LoadFile"	autorun/wire_expression2_editor.lua
    	40: Line 315	"OnFileClick"	autorun/wire_expression2_editor.lua
    	41: Line 81	"DoClick"	autorun/wire_expression2_browser.lua
    	42: Line 64	"InternalDoClick"	vgui/DTree_Node.lua
    	43: Line 38	"(null)"	vgui/DTree_Node.lua
    44	C function
    	45: Line 169	"PCallError"	includes\util.lua
    	46: Line 83	"(null)"	vgui/DButton.lua
    
    
    The exact error was: The following error has occured: Unexpected token found (rpa), please report this to me@syranide.com at line 23, char 4
    
    Trace: 
    	1: Line 32	"Trace"	includes/extensions/debug.lua
    	2: Line 15	"errorHalt"	autorun/shared/StargateExtras.lua
    	3: Line 17	"errorHalt"	autorun/shared/StargateExtras.lua
    	4: Line 17	"errorHalt"	autorun/shared/StargateExtras.lua
    	5: Line 17	"error"	autorun/shared/StargateExtras.lua
    	6: Line 550	"Error"	entities\gmod_wire_expression2\core/init.lua
    	7: Line 1165	"(null)"	entities\gmod_wire_expression2\core/init.lua
    	8: Line -1	""	(tail call)
    	9: Line -1	""	(tail call)
    	10: Line -1	""	(tail call)
    	11: Line -1	""	(tail call)
    	12: Line 924	"(null)"	entities\gmod_wire_expression2\core/init.lua
    	13: Line -1	""	(tail call)
    	14: Line 636	"(null)"	entities\gmod_wire_expression2\core/init.lua
    	15: Line -1	""	(tail call)
    	16: Line 636	"(null)"	entities\gmod_wire_expression2\core/init.lua
    	17: Line -1	""	(tail call)
    	18: Line 636	"(null)"	entities\gmod_wire_expression2\core/init.lua
    	19: Line -1	""	(tail call)
    	20: Line 636	"(null)"	entities\gmod_wire_expression2\core/init.lua
    	21: Line -1	""	(tail call)
    	22: Line 636	"(null)"	entities\gmod_wire_expression2\core/init.lua
    	23: Line -1	""	(tail call)
    	24: Line 636	"(null)"	entities\gmod_wire_expression2\core/init.lua
    	25: Line -1	""	(tail call)
    	26: Line 636	"(null)"	entities\gmod_wire_expression2\core/init.lua
    	27: Line -1	""	(tail call)
    	28: Line 861	"(null)"	entities\gmod_wire_expression2\core/init.lua
    	29: Line -1	""	(tail call)
    	30: Line 784	"IfCond"	entities\gmod_wire_expression2\core/init.lua
    	31: Line 691	"Stmt1"	entities\gmod_wire_expression2\core/init.lua
    	32: Line 673	"(null)"	entities\gmod_wire_expression2\core/init.lua
    	33: Line -1	""	(tail call)
    	34: Line 562	"(null)"	entities\gmod_wire_expression2\core/init.lua
    35	C function
    	36: Line 543	"Execute"	entities\gmod_wire_expression2\core/init.lua
    	37: Line 28	"wire_expression_validate"	entities/gmod_wire_expression2/cl_init.lua
    	38: Line 485	"Validate"	autorun/wire_expression2_editor.lua
    	39: Line 551	"SetCode"	autorun/wire_expression2_editor.lua
    	40: Line 595	"LoadFile"	autorun/wire_expression2_editor.lua
    	41: Line 315	"OnFileClick"	autorun/wire_expression2_editor.lua
    	42: Line 81	"DoClick"	autorun/wire_expression2_browser.lua
    	43: Line 64	"InternalDoClick"	vgui/DTree_Node.lua
    	44: Line 38	"(null)"	vgui/DTree_Node.lua
    45	C function
    	46: Line 169	"PCallError"	includes\util.lua
    	47: Line 83	"(null)"	vgui/DButton.lua
    
    
    The exact error was:

  3. #2203
    Wire Amateur Pyroclastic's Avatar
    Join Date
    Jan 2009
    Posts
    47

    Default Simple E2 function request.

    In another thread I was asking about how to work with a timer for the purposes of a chronograph type device. Normally the way I would approach this is, with a known distance, get the ∆Time by doing taking the end time (in ms) minus the start time (also in ms). However, I learned that curTime() only operates in seconds. This makes sense as Lua's default time function only returns seconds since the Unix Epoch.

    I would like a equivalent function to curTime() for milliseconds, or even smaller units. Even if Lua only by default supports seconds (For reasons unknown; Even Java has time functions down to nanoseconds.), time since GMod was started, or since joining the server could be used. Or even time since creation of the E2 itself.

    Thanks.

  4. #2204
    Wire Sofaking ZeikJT's Avatar
    Join Date
    Dec 2008
    Location
    California
    Posts
    1,391

    Default Re: Expression Gate 2

    @Captain Maim- Look at the post above yours.
    Wait, maybe not... that's some weird error.

    Does that only happen when saving?
    Last edited by ZeikJT; 03-02-2009 at 05:33 PM.
    Against stupidity the Gods themselves contend in vain.
    -Friedrich Schiller

    The flame puts me in the mood to "Do it!".
    -Dart, Legend of Dragoon

  5. #2205
    [2x Lifetime Supporter] Solonari's Avatar
    Join Date
    Feb 2007
    Location
    Northern California
    Posts
    66

    Default Re: Expression Gate 2

    Quote Originally Posted by ZeikJT View Post
    I've looked at the lua code for it and honestly it's probably the best way, the code for it is as follows:
    Code:
    (GetAllConstrainedEntities() stuff)
    It shouldn't be used too often as it removes the E2 chip itself, so unless someone is constantly spamming adv dupes with it (which is in itself a possible abuse) there's no way to overuse it.
    Plus, it doesn't seem like an overly complex/consuming process. FindInSphere is probably more intensive.
    It seems the complexity is high. Tried to protect a structure every 100 msec and it actually made pings suffer. Looks like the very best implementation is in a swan song like your selfDestructAll() routine. Too bad

    Quote Originally Posted by ZeikJT View Post
    Of course it checks for ownership! ^_^
    Code:
    isOwner(rv1, v) stuff
    Unfortunately, isOwner always returns true if the wire restriction is turned off, which will remove anyone else's props as well. Would it be better to move this to a pure (getOwner(self, rv1) == self.player) check instead? Not that most people would turn off the restriction, of course.
    There are 10 types of people in the world: those who understand binary and those who do not.

  6. #2206
    Wire Sofaking Captain Maim's Avatar
    Join Date
    Aug 2008
    Posts
    528

    Default Re: Expression Gate 2

    Actually I don't know when that happened, I thought it was saving.
    Can't save files? Pfft! if that's true for today. I'll take a break from GMod for today since it's no point making a contraption I can't save.

    I actually didn't realize it wasn't just me. I made like 2 chips and "saved them" only to find I did absolutely nothing. Lost both. :( I recreated one the other was really simple.. At least no real harm done..



    Is it only possible to acquire the owner of an entity if YOU are it's owner? Seems really silly to me.

    But I was trying E:owner():name() on other's entities and it'd come back nil. On mine it said my name, gave me my steam ID and all the other junk I wanted. Other's stuff? I got no steamID and no owner name. Why is that function only able to acquire info on my stuff?

  7. #2207
    Wire Sofaking ZeikJT's Avatar
    Join Date
    Dec 2008
    Location
    California
    Posts
    1,391

    Default Re: Expression Gate 2

    Quote Originally Posted by Solonari View Post
    It seems the complexity is high. Tried to protect a structure every 100 msec and it actually made pings suffer. Looks like the very best implementation is in a swan song like your selfDestructAll() routine. Too bad
    Every 100ms??? Who deletes everything every 100ms?
    I'll look into writing a custom routine for you to test. I don't know if it'll be more efficient but who knows.

    Quote Originally Posted by Solonari View Post
    Unfortunately, isOwner always returns true if the wire restriction is turned off, which will remove anyone else's props as well. Would it be better to move this to a pure (getOwner(self, rv1) == self.player) check instead? Not that most people would turn off the restriction, of course.
    Aha, good that you pointed it out, I don't play on servers so I would never have noticed. I'll change it.
    Against stupidity the Gods themselves contend in vain.
    -Friedrich Schiller

    The flame puts me in the mood to "Do it!".
    -Dart, Legend of Dragoon

  8. #2208
    Wirererer DataSchmuck's Avatar
    Join Date
    Nov 2007
    Posts
    106

    Default Re: Expression Gate 2

    But I was trying Ewner():name() on other's entities and it'd come back nil. On mine it said my name, gave me my steam ID and all the other junk I wanted. Other's stuff? I got no steamID and no owner name. Why is that function only able to acquire info on my stuff?
    I am able to get the owner and name and IDs of other entities with no problems.

    Also, would this work for protection?
    Code:
    if (!entity():owner():mySteamID) {selfDestructAll()}

  9. #2209
    Wire Sofaking Jimlad's Avatar
    Join Date
    Dec 2008
    Posts
    941

    Default Re: Expression Gate 2

    Believe it or not, with the inclusion of inertia(), I now actually have a use for multiplying angles with each other. At the moment I can get around it by converting to vectors and multiplying, then converting back, but it's pretty awkward - never thought I'd have a use for that either, but there you go. It's not exactly a major addition, so I hope there aren't any issues with adding it. Vector "multiplication" is in the svn too, so I figure this was just an oversight:

    Code:
    registerOperator("mul", "aa", "a", function(self, args)
    	local op1, op2 = args[2], args[3]
    	local rv1, rv2 = op1[1](self, op1), op2[1](self, op2)
    	return { rv1[1] * rv2[1], rv1[2] * rv2[2], rv1[3] * rv2[3] }
    end)
    To show that all of this stuff is genuinely extremely useful, here's a very simple E2 example that applies a torque to prevent any prop from spinning, and will work equally well with props of any size, mass, or shape:

    Code:
    @inputs Ent:entity
    @persist AngInertia:angle
    
    interval(10)
    
    if (first()) { AngInertia = ang(Ent:inertia():y(), Ent:inertia():z(), Ent:inertia():x()) }
    Ent:applyAngForce( AngInertia * -Ent:angVel() * 15 )
    Last edited by Jimlad; 03-02-2009 at 08:16 PM.

  10. #2210
    Wire Sofaking Captain Maim's Avatar
    Join Date
    Aug 2008
    Posts
    528

    Default Re: Expression Gate 2

    Quote Originally Posted by DataSchmuck View Post
    I am able to get the owner and name and IDs of other entities with no problems.

    Also, would this work for protection?
    Code:
    if (!entity():owner():mySteamID) {selfDestructAll()}
    Super cool code there, very condensed and unbiquitous, I like it.

    Well basically I got totally sick of making chips tacked onto rangers to find out info like model and class and other stuff so I created a single chip that outputs anything I wanted to know as hints for me to look at. I had txt receiver on it so I could ask for an update and not wire a darn thing to it but it doesn't work for some reason anymore. I don't get it.

    And if I shot my stuff with it... (most of my stuff that is. Like stool turret gave me no information except mass. Which surprises me. ) But yeah, my stuff gives my steam ID and my name and lots of other stuff that I commonly or even uncommonly use. HEY I should toss inertia in there too.

    Anyway if I shot someone else's stuff or the world's stuff. No owner name, no owner info at all. Model and class and such came out but if my hud didn't tell me the owner up front I wouldn't know. Very strange. I can paste the chip if you want but it's just an info grabber.

    Suggestion:


    Does anyone wish sometimes that they could save the value of a variable to file or something? I was thinking you run a command on a variable and it outputs a simple thing at the bottom say like this:

    Let's say that the chip defines Dog = 34 But it's not stated that way anywhere. So you run a command like:

    printNumber(Dog)


    and after running the command this is how it appears in the chip:

    printNumber(Dog)
    #Dog = 34

    The values it outputs are on the line below the command that output them, the value you see would be the last one the chip wrote before you shot it, and commented out so they don't break anything. You then paste that somewhere and disable the print command. If you have three prints like this:

    printNumber(Dog) printVector(Monkey) printString(Zebra)

    When after they've run the chip appears like this

    printNumber(Dog) printVector(Monkey) printString(Zebra)
    #Dog = 34 Monkey=vec(345,1925,-1854) Zebra = "String example here"

    Anyway, it's just an idea.... Mostly I just wish I could do that when I'm dealing with strings. And like I wanna enroll some class of something into my chip I have to make a chip to get it and then I have to manually type it out and hope I spelled it right. This way I could just swipe it and print it into the chip and then paste it to where I want it. After I edit the chip again.

    Possibly the print function could comment itself out after first use so it can't spam if that's an issue.

Closed Thread

LinkBacks (?)


Similar Threads

  1. Expression Gate : Can't save expression
    By m0nday in forum Bug Reports
    Replies: 2
    Last Post: 08-06-2008, 12:29 PM
  2. Gate - Expression -> Gone!
    By Qvazzler in forum Installation and Malfunctions Support
    Replies: 10
    Last Post: 05-25-2007, 10:26 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
proceed-collector
proceed-collector
proceed-collector
proceed-collector
linguistic-parrots
linguistic-parrots
linguistic-parrots
linguistic-parrots