Code Monkey home page Code Monkey logo

expadv3's People

Contributors

composerfreak avatar cornerpin avatar damianu avatar divran avatar edotm avatar killimataro avatar oskar94 avatar rusketh avatar suunr avatar tanknut avatar veritas-99 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

expadv3's Issues

[BUG] E3 Screen Undo Lua errors

Have you checked it with the latest version of the repository:
Yes, the latest Git version.

How many people are experiencing it (to your knowledge, including yourself):
Not sure, I guess I'm the only one.

Please describe in brief the issue you are experiencing:
When spawn a E3 Screen, it works fine, but if you undo it, it won't undo and make Lua errors.

If your getting any errors in game console, please provide them below:

Danct12 #hentai in gmod!?(STEAM_0:0:44529914) used tool wire_expression3_screen on maps/gm_carcon_ws.bsp
stack overflow
  1. GetTable - [C]:-1
   2. __index - lua/includes/extensions/entity.lua:23
    3. BuildDupeInfo - addons/expadv3/lua/entities/wire_expression3_base/init.lua:221
     4. BuildDupeInfo - addons/expadv3/lua/entities/wire_expression3_base/init.lua:221
      5. BuildDupeInfo - addons/expadv3/lua/entities/wire_expression3_base/init.lua:221
       6. BuildDupeInfo - addons/expadv3/lua/entities/wire_expression3_base/init.lua:221
        7. BuildDupeInfo - addons/expadv3/lua/entities/wire_expression3_base/init.lua:221
         8. BuildDupeInfo - addons/expadv3/lua/entities/wire_expression3_base/init.lua:221
          9. BuildDupeInfo - addons/expadv3/lua/entities/wire_expression3_base/init.lua:221
           10. BuildDupeInfo - addons/expadv3/lua/entities/wire_expression3_base/init.lua:221
            11. BuildDupeInfo - addons/expadv3/lua/entities/wire_expression3_base/init.lua:221
             12. BuildDupeInfo - addons/expadv3/lua/entities/wire_expression3_base/init.lua:221
              13. BuildDupeInfo - addons/expadv3/lua/entities/wire_expression3_base/init.lua:221
               14. BuildDupeInfo - addons/expadv3/lua/entities/wire_expression3_base/init.lua:221
                15. BuildDupeInfo - addons/expadv3/lua/entities/wire_expression3_base/init.lua:221
                 16. BuildDupeInfo - addons/expadv3/lua/entities/wire_expression3_base/init.lua:221

I did not put any codes into the chip, it's just blank.

[BUG] Wirelink attempt has lua error

Attempting to use wirelink in the code below causes this error to pop when uploaded. Code seems valid when compared to helper's definitions.

One of your Expression3 gate's has errored (see golem console).
Suffered a lua error:
Error: addons/expadv3/lua/expression3/extensions/wirelink.lua:99: attempt to index global 'context' (a nil value)

    
    @input wirelink Pod;
    @input wirelink Gyro;
    bool active = false;
    
    system.setInterval(250);
    
    function void Loop() {
        system.print(Gyro["On", number]);
    }
    
    event.add("Think", "Loop", Loop);
}```

[BUG] Nested foreach loops forget their variables

As the title says, nesting foreach loops causes the initial variable in the top loop to be forgotten. The code below gives the error
Warning Compiler Error: Variable e does not exist at line X char Y
Directly referencing the table c = e.getConstraints() line. This error does not seem to appear without nested foreach loops.

server {
    function void Main() {
        table test = new table(entity);
        
        foreach(entity e in test)
        {
            table c = e.getConstraints();
            foreach(constraint c in con)
            {
                
            }
        }
    }
    
    function void Loop() {
        //Same as RunOnTick;
    }
    
    event.add("Think", "Loop", Loop);
    Main();
}

[BUG] Wirelink error again

Wirelink code below spits out this error. Again, it is used as the helper shows it should be.

One of your Expression3 gate's has errored (see golem console).
Suffered a runtime error:
Message: No such Output WireLink[On, nil].
At: Line 9 Char 8

server {
    
    @input wirelink Pod;
    @input wirelink Gyro;
    bool active = false;
    
    system.setInterval(250);
    
    function void Loop() {
        system.print(Gyro["On", wirelink]);
    }
    
    event.add("Think", "Loop", Loop);
}

[BUG] Wirelink lacks useful validity checks

As per recommendations:
The following code causes a stack overflow, and there is no isValid for a wirelink entity.
Or nil check. For anything. it's getting a little annoying.

server {
    
    wirelink test = nil;
    
    ((entity)test).isValid()
}

[BUG] sound.play cannot be used repeatedly

Exactly as the title states, sound.play() only works once then errors out on the second attempt. Please see test code below.

    Error: addons/expadv3/lua/expression3/extensions/sound.lua:50: attempt to index field 'sound' (a nil value)
server {
    
    
    function void StopAlarmSounds()
    {
        timer.remove("Alarm");
        sound.stopAll();
    }
    
    function void SoundAlarm()
    {
        sound.play(((entity)system.getOwner()), 0, 1, "alarms/klaxon1.wav");
    }
    
    timer.create("Alarm", 1.1, 0, SoundAlarm);
    timer.simple(12, StopAlarmSounds);
}

return function(env) 
    
    setfenv(1,env) 
    
    --PRICE: 1 
    
    CONTEXT:CheckPrice(1) 
    if (SERVER) then 
        
        --PRICE: 46 
        
        CONTEXT:CheckPrice(46) 
        local StopAlarmSounds = {op = function( ) 
                
                --PRICE: 21 
                
                CONTEXT:CheckPrice(21) 
                _FUN["timer.remove(s)"]( CONTEXT , "Alarm" ) _FUN["sound.stopAll()"]( CONTEXT ) 
            end, 
        result = "_nil", count = -1, scr = CONTEXT}; 
        local SoundAlarm = {op = function( ) 
                
                --PRICE: 33 
                
                CONTEXT:CheckPrice(33) 
                _FUN["sound.play(e,n,n,s)"]( CONTEXT , ( _OPS["(e)p"]( CONTEXT , _FUN["system.getOwner()"]( CONTEXT ) ) ) , 0 , 1 , "alarms/klaxon1.wav" ) 
            end, 
        result = "_nil", count = -1, scr = CONTEXT}; 
    _FUN["timer.create(s,n,n,f,...)"]( CONTEXT , "Alarm" , 1.1 , 0 , SoundAlarm ) _FUN["timer.simple(n,f,...)"]( CONTEXT , 12 , StopAlarmSounds ) end 
end 

Debug file

Wiki inits examples.lua File not Found

when a player join me server this is coming.

[15:53] Player [2][E2 Ghibli] ERR: Couldn't include file 'wiki\inits\examples.lua' (File not found) (@addons/expadv3/lua/expression3/wiki_inc.lua (line 14))

[BUG] Entity (variables) don't work with applyForce();

  1. If you wish to alert us of more than one issue or request please submit them separately!
  2. Please make sure that any long quotes of text (e.g code) should be submitted in the form of a gist link.
  3. Check that your request / issue has not already been mentioned, if it has please comment on the existing page instead.
  4. If this is a request, please clear the template below and provide your request in as much detail as possible.
  5. Please fill out the following template as accurately as possible:
    1. Have you checked it with the latest version of the repository:
      If no, please do so and if you are not on the latest version, please update and re-test.
      Yes (development and stable)
    2. How many people are experiencing it (to your knowledge, including yourself):
      N/A (don't know)
    3. Please describe in brief the issue you are experiencing:
      Entity variables don't seem to work with applyForce (system.getEntity() produces a similar result when used in place of an entity variable which is assigned to system.getEntity() )
    4. If your getting any errors in game console, please provide them below.
      N/A
    5. If your getting either a tokenizer, parser, compiler or internal error, please provide that below.
      Warning Compiler Error: Unexpected symbol found (var) at line 5 char 12
      5.1 Please provide a gist link to your code.
      here
      5.2 Please run the validation debugger and provide screenshots of the output tab. You can do this by right-clicking the validation bar and selecting "Validate and debug".
      (no such option when right-clicking the validation bar)
    6. Please make sure to prefix your title with either [BUG] for issues or [REQ] for requests, as well as attaching any suitable labels.
      done
    7. Is this issue linked to a specific code you are trying to execute:
      Not that I know of

[BUG] Play Sound throws lua error

Please see the code below, which throws the lua error shown further below.
Yes, the sound file should exist in the library. Unless the string format is wrong.

server{
    entity self = system.getEntity();
    sound.play(0, 3, "alarms/klaxon1.wav");
}
One of your Expression3 gate's has errored (see golem console).
Suffered a lua error:
    Error: addons/expadv3/lua/expression3/extensions/sound.lua:62: bad argument #1 to 'match' (string expected, got nil){
	1: Line 279	"nil"		addons/expadv3/lua/entities/wire_expression3_base/shared.lua
	2: C function	"match"
	3: Line 62	"playSound"		addons/expadv3/lua/expression3/extensions/sound.lua
	4: Line 194	"sound.play(n,n,s)"		addons/expadv3/lua/expression3/extensions/sound.lua
	5: Line 15	"nil"		Expression 3
	6: C function	"xpcall"
	7: Line 293	"Execute"		addons/expadv3/lua/entities/wire_expression3_base/shared.lua
	8: Line 262	"InitScript"		addons/expadv3/lua/entities/wire_expression3_base/shared.lua
	9: Line 63	"nil"		addons/expadv3/lua/entities/wire_expression3_base/shared.lua
}

[BUG] net cannot write 0 to a message

Net messages cannot take 0 as an argument for writeFloat. It says cannot compare to nil. wub.

 server {
    stream t_st = net.start("Test");
    t_st.writeFloat(0);
    net.sendToClient(t_st);
}

client {
    
    function void Test(stream in)
    {
        system.print(in.readFloat());
    }

    net.receive("Test",Test)
}

[BUG] Chip is always crashing

How many people are experiencing it
Only me right now

Please describe in brief the issue you are experiencing:
When i spawn a exp 3 the is always printing me out "One of your Expression3 gate's has errored (see golem console)."

Exp3 Code:
system.print("hi");

Yeah, thats my code!

Debug native output:
return 1 ( , env ) setfenv env ) function ( _FUN["system.print(...)"] ( CONTEXT "s" { , , "hi" } ) ; end

[REQ] Apply constraint to entities

As the title says, this request is for the Expression 3 chip to be able to apply a constraint to two entities (i.e. weld two props or no-collide a jump drive to itself.)

[BUG] Using hologram in Expression 3 leads Validation to Engine Error

Using hologram in Expression 3 leads Validation to Engine Error

Repeated validation will lead to an engine crash if a hologram is used in a decently sized Expression 3 code. Can't really describe it better than that.

Example code (just keep validating):
https://gist.github.com/Scors4/365a3f5136c32f6ffc1e80c89d2b4a6e

Further testing shows that it's not just holograms:
https://gist.github.com/Scors4/975bc214d70801195ae40f7fe47166dc

render.getTextSize won't working

I always got this error when I ran render.getTextSize.

Suffered a lua error:
    Error: addons/expadv3/lua/expression3/extensions/render.lua:308: attempt to call field 'setFont' (a nil value)

I'm using the latest version on github.

[BUG] constraint.type is not a valid method? (Despite being an attribute)

Please see the code and warning below. This is focused on the constraint.type attribute, which if replaced with c,.entity1 will pass the compiler check.

table t = system.getEntity().getConstraints();
if(#t)
{
    system.printTable(t);
    constraint c = t[1];
    system.print(c.type);
}
  Warning Compiler Error: method name expected after method operator (.) at line 397 char 25

[BUG] Exponents can crash server

Using an exponent on a piece of a vector causes instability. It crashes the multiplayer server I've used it on, but it doesn't crash singleplayer (the chip self-deletes instead.)

Replication: put code on chip, unfreeze chip.
Code:

function void Main() {
server {
global entity E = system.getEntity();
global vector TPos = E.getPos() + vector(0,0,50);
}
}

function void Loop() {
server {
vector v = (TPos - E.getPos());
if((v.x > 0.5) || (v.x < -0.5)) v.x = v.x ^ 0.85
if((v.y > 0.5) || (v.y < -0.5)) v.y = v.y ^ 0.85
if((v.z > 0.5) || (v.z < -0.5)) v.z = v.z ^ 0.85
v = v * E.getMass();
E.applyForce(v);
}
}

event.add("Think", "Loop", Loop);
Main();

[BUG] RecipientFilter not working

I'm using the last master version of AdvExp3.
Steps to reproduce:

  • Open Expression 3 Golem editor
  • Write the following code:
server {
    recipientfilter r = new recipientfilter();
}
  • Validate, and you'll get an error.

The error is the following:

Internal error: addons/expadv3/lua/expression3/compiler.lua:2946: Attempt to inject _crf() but operator was incorrect nil.

Gmod version (latest):

Protocol version 24
Exe version 2021.06.09 (garrysmod)
Exe build: 14:40:17 Jul 12 2021 (8283) (4000)

[BUG] Userclasses cannot be pushed to a table.

@name "Generic Gate";
table newTable = new table()
class testClass
{
testClass() {
system.out("Hej")
}
}
function void Main() {
testClass myTestClass = new testClass()
newTable.push(myTestClass)
}
Main();

The above code doesn't work, the newTable.push method simply returns an error saying that there is not such a method.
Simularily i am not allowed to cast the user class to a variant.

Remove entity error

Reported by a workshop user, noting it here.

[Expression 3] lua/entities/wire_expression3_base/shared.lua:95: attempt to call method 'ExecuteInstance' (a nil value)

  1. cb - lua/entities/wire_expression3_base/shared.lua:95
  2. unknown - lua/expression3/expr_lib.lua:1471

[Expression 3] lua/entities/wire_expression3_base/shared.lua:95: attempt to call method 'ExecuteInstance' (a nil value)

  1. cb - lua/entities/wire_expression3_base/shared.lua:95
  2. unknown - lua/expression3/expr_lib.lua:1471

[BUG] Wirelink can not write to target

As the title states, a wirelink can be established with both getWirelink() and with the normal wire tool, but the actual interface cannot push values to other wire entities. The exception seems to be strp mining lazors, but the strp jump drive and any non-strp wire entities will not receive the values.

Attached is an strp test code, which requires ownership of a first tier jump drive. The Use Angle and Vector are not written to the drive, and the Energy number returned is 0.

server{
    
    wirelink drive_wl = nil;
    entity self = system.getEntity();
    entity drive = strp.invSpawn("st_jumpdrive_one", self.pos());
    
    drive_wl = drive.getWirelink();
    drive_wl["Use Angle", number] = 1
    drive_wl["Vector", vector] = vector(50, 1251, 234);
    
    system.print(drive_wl["Energy",number])
}

Typo in the definition of 'hololib.canCreate' causing lua error

When 'hololib.canCreate' is called, it throws the following error:

Error: addons/expadv3-master/lua/expression3/extensions/holograms.lua:312: attempt to index global 'xtx' (a nil value)

I believe the problem is that there is a typo on this line that should be corrected by replacing 'xtx' with 'ctx'.

[REQ] On Last / On Finish / On Removed Event

As the title suggests, this request is for an On Last event that is run when the E3 is removed/reset.
This is so that there can be a "recovery" of objects if they're parented to the chip or perhaps a notification of the final run when the chip is removed by someone other than the owner.

Basically an event that is called as the last execution of a chip.

[BUG] Cannot break from try/catch statement

As the title suggests, attempting to break from the catch portion of a try/catch statement will result in this validation error:
Warning Compiler Error: Break must not appear outside of a loop at line XX char YY

simple example:

table arr = new table(entity);
while(true)
{
    try {
        entity e=arr.popentity();
    }
    catch (theError)
    {
        break;
    }
}

[BUG] Recipientfilter (still) not working

(I would have reopened #53 but I can't)
The constructor of recipientfilter works, but if you try to execute any method, it will give an error message. For example, the code

@input player MainPlayer;
recipientfilter rf = new recipientfilter();
rf.addPlayer(MainPlayer);

Will give the error

Internal error: EXPR_LIB.GetClass(s) was given nil.

[Bug] GetOWner typo

system.getOwner() results in this error.
--Correction, it appears to be a find issue. My Bad.

Error: addons/expadv3/lua/expression3/extensions/find.lua:71: attempt to call method 'getOWner' (a nil value){
1: Line 276 "getOWner" addons/expadv3/lua/entities/wire_expression3_base/shared.lua
2: Line 71 "filter" addons/expadv3/lua/expression3/extensions/find.lua
3: Line 472 "_ed.findInSphere(v,n)" addons/expadv3/lua/expression3/extensions/find.lua
4: Line 18 "invoke" Expression 3
5: Line 29 "nil" Expression 3

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.