storing lambda function in objects

Post ideas & suggestions you have pertaining to the game here.
Post Reply
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

When storing a lambda function into an object it doesn't want to store correctly.

here is the code that I used to test it

Code: Select all

			(setq test (lambda (other)
				(block (myvar)
					(setq myvar (lambda (a b) (multiply a b)))
					(dbgoutput (objSetData gplayership "mytest" myvar))
					(dbgoutput (apply myvar (list 5 3)))
					(dbgoutput (apply (objGetData gplayership "mytest") (list 5 3)))
					
				)

			))
When run it outputs to the dbgscreen

True
15
[lambda

is this as intended?
Crying is not a proper retort!
Post Reply