fun with function tests

Freeform discussion about anything related to modding Transcendence.
Post Reply
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

Just thought it might be cool to share some code that tests how a function works. What do you think this code displays and what does that mean for the functions in this example?

Code: Select all

				(block Nil
					(plyRedirectMessage gPlayer True)
					(plyMessage gplayer "redirect") 
					(if (plyGetRedirectMessage gPlayer)
						(plyMessage gplayer " ") 
						)
					(plyMessage gplayer "redirectother") 
					(plyRedirectMessage gPlayer Nil)
					(plyMessage gplayer "after") 
					(plyMessage gplayer "afterafter") 
					(plyMessage gplayer (plyGetRedirectMessage gPlayer))
					(plyRedirectMessage gPlayer True)
					(plyRedirectMessage gPlayer Nil)
					(plyMessage gplayer (plyGetRedirectMessage gPlayer))
					)
Crying is not a proper retort!
User avatar
Ttech
Fleet Admiral
Fleet Admiral
Posts: 2767
Joined: Tue Nov 06, 2007 12:03 am
Location: Traveling in the TARDIS
Contact:

it brokey me game. :) B


ut I think I did something wrong.
Image
Image
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

well this code does assume you are just flying along when run. I made a global function called testFunction and stuck it in there. If you still have problems show me the code.
Crying is not a proper retort!
User avatar
digdug
Fleet Admiral
Fleet Admiral
Posts: 2620
Joined: Mon Oct 29, 2007 9:23 pm
Location: Decoding hieroglyphics on Tan-Ru-Dorem

if added to an <Invoke> tag it prints exacly:

Nil
redirect redirectothers
afterafter
after


I'm still reading the code, but it's a little to complicated without explanations for me.
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

I'm still reading the code, but it's a little to complicated without explanations for me.
That the fun of it. To try to come up with an explanation that works and can be tested further. :D

Also that is what it displays.
Crying is not a proper retort!
Post Reply