composerfreak / expadv3 Goto Github PK
View Code? Open in Web Editor NEWExpression Advanced 3
Expression Advanced 3
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.
@name "Stack-overflow"
function void Main() {
table a = new table()
table b = new table()
a["b", table] = b
}
Main()
this seems to cause a stack overflow in table.updateChildren
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);
}```
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();
}
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);
}
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()
}
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
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))
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
}
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)
}
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
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.)
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
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.
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
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();
I'm using the last master version of AdvExp3.
Steps to reproduce:
server {
recipientfilter r = new recipientfilter();
}
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)
As the title says, it appears that E.isFrozen() reports false when frozen and true when not frozen.
Took me a bit to realize this.
@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.
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)
[Expression 3] lua/entities/wire_expression3_base/shared.lua:95: attempt to call method 'ExecuteInstance' (a nil value)
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])
}
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'.
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.
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;
}
}
(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.
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
if (1 < 1 && 2 == 2) {
}
The code above wont compile without putting a pair of brackets around the first parameter.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.