YOUR ACCOUNT

Login or Register to post new topics or replies
Sphinx.
Filter Optimizer

Posts: 1750
Filters: 39
First of all, there is a minor problem when working with external script files (via dofile() or require in unsafe mode):

Changes in the external script file is adopted immediately during rendering (or perhaps its because of thread copies of the script as discussed earlier). This can cause crashes or inconsistent results (made up of a script in different states).

I guess this is fundamental functionality of the lua "engine", but maybe it can be configured differently, so that the external script is copied before execution and thereby remain consistent during execution.

I don't have a test filter, but it is easy to reproduce, just change and save the external script while the previous state is rendering..

Secondly, I'm facing a strange problem with dofile() and require: At my workstation, these two features work great (when unsafe is enabled of course), but at my home computer, I simply can't get them to work, I constantly get the malformed script error, as if Unsafe is not enabled.. so I'm wondering if there are some special requirements for using these features?
  Details E-Mail
Sphinx.
Filter Optimizer

Posts: 1750
Filters: 39
This is really bothering me: why can I use require on one computer, but not on another.. veeery strange.

I implemented a common VectorXYZ metaclass with support for all lua operators and a set of useful metamethods (example code to show what is possible):

Quote
local v1 = VectorXYZ.new(1,2,3)
local v2 = VectorXYZ.new(4,5,6)
local s = 1.5

local test = ((v1 * v2).sum * s ^ v1 / v1.normalized % s).length

if (v1.x > test) then
--
end


Get the point? You can work directly with composite types (this could be complexes, rgb colors etc), without the need to treat them as tables and unwrap every operation..

The "class" is rather lengthy and pasting copies of it in every script components seems..well.. plain stupid smile:cry:

I tried to attach the .lua file here (can you please add .lua to the allowed file type mask for the forum?). Tried with .txt too, same problem.. pasting code here will screw up formatting, so I will not do that.
  Details E-Mail
Sphinx.
Filter Optimizer

Posts: 1750
Filters: 39
Hmm, once again it seems that the dreaded "Error 40" is at work again (i.e. error located 40 centimeters away from the keyboard smile;)).. It seems that lua is very picky about cases when "requiring". I will confirm later when I get home to test things..
  Details E-Mail

Join Our Community!

Filter Forge has a thriving, vibrant, knowledgeable user community. Feel free to join us and have fun!

33,711 Registered Users
+18 new in 30 days!

153,531 Posts
+36 new in 30 days!

15,347 Topics
+72 new in year!

Create an Account

Online Users Last minute:

16 unregistered users.