I discovered that "Return" works, are there other un

Post » Wed Jun 20, 2012 9:42 am

AFAIK RETURN is not in the wiki. I did a Keyword search and looked thru the list of commands but did not find this. However I tested it in a script and it worked.

So assuming that I did not just miss seeing this in the Wiki, has anyone else found other such working undocumented commands?
User avatar
Auguste Bartholdi
 
Posts: 3521
Joined: Tue Jun 13, 2006 11:20 am

Post » Tue Jun 19, 2012 8:32 pm

It's http://www.creationkit.com/Keyword_Reference where it should be. How would anyone write functions without it?

Edit: Just to clarify, it's not a command it is a keyword a language construct.
User avatar
Elea Rossi
 
Posts: 3554
Joined: Tue Mar 27, 2007 1:39 am

Post » Tue Jun 19, 2012 10:55 pm

No, you don't undestand (or I do not) I am not talking about getting a result from A+B
am talking about stopping the script and starting the script over not allowing any of the script below it to run:


Event OnUpdate()
Return
Debug.messagebox("Test") ; you never see this message
endevent


This was a command I use often in Oblivion. Maybe I am still missing something here, please correct me if that is the case. could it be that this compiles but then because I am not using it correctly if "shorts circuits the script" as a malfunction and not as a command as I am thinking of it?

Or maybe my test was faulty, could be some other reason I did not see the test message?
This was my test:


Event OnUpdate()
Debug.Notification("Working") ; you DO see this message
Return
Debug.messagebox("Test") ; you never see this message
endevent



It's http://www.creationkit.com/Keyword_Reference where it should be. How would anyone write functions without it?

Edit: Just to clarify, it's not a command it is a keyword a language construct.
User avatar
daniel royle
 
Posts: 3439
Joined: Thu May 17, 2007 8:44 am

Post » Wed Jun 20, 2012 1:55 am

No, you don't undestand (or I do not) I am not talking about getting a result from A+B
am talking about stopping the script and starting the script over not allowing any of the script below it to run:
You are talking about what he is talking about, return ends the function and returns a value, if you dont put a value after it it returns none.

This was a command I use often in Oblivion. Maybe I am still missing something here, please correct me if that is the case. could it be that this compiles but then because I am not using it correctly if "shorts circuits the script" as a malfunction and not as a command as I am thinking of it?

Or maybe my test was faulty, could be some other reason I did not see the test message?
Most likely your test was faulty

Edit: I'm a little confused after reading your post, so just to clarify,
Event OnUpdate()
Debug.Notification("Working") ; you DO see this message
Return
Debug.messagebox("Test") ; you never see this message
endevent
This script will never show the "Test" messagebox because return is ending the event before it gets there
User avatar
Keeley Stevens
 
Posts: 3398
Joined: Wed Sep 06, 2006 6:04 pm

Post » Tue Jun 19, 2012 7:40 pm

As Xtynct says that's how Return should work if you didn't give parameters. Your test is not faulty. It's working as intended.
User avatar
Tikarma Vodicka-McPherson
 
Posts: 3426
Joined: Fri Feb 02, 2007 9:15 am

Post » Tue Jun 19, 2012 11:13 pm

Yes to all of it. But is it in the wiki? ;)
User avatar
Elina
 
Posts: 3411
Joined: Wed Jun 21, 2006 10:09 pm

Post » Wed Jun 20, 2012 8:30 am

Yes to all of it. But is it in the wiki? ;)
I don't know, but realize that the wiki is by no means comprehensive, and is still very much lacking in a lot of departments. I believe that as it stands, the community is now responsible for adding the remainder of any topics not yet covered, though I might be wrong.
User avatar
Trevor Bostwick
 
Posts: 3393
Joined: Tue Sep 25, 2007 10:51 am

Post » Wed Jun 20, 2012 1:24 am

Edit-Sorry, accidentally double-posted..
User avatar
Project
 
Posts: 3490
Joined: Fri May 04, 2007 7:58 am

Post » Wed Jun 20, 2012 3:36 am

um...yeah...that is why I made this post.

Soooo.... I guess this is indeed "undocumented" and I was hoping I was not the only one to find such undocumented "bits" like this.
If we get more discoveries like this in threads like this it can be debated like this and then put in the wiki.

I suppose I feel comfortable enough now with the "Skyrim way" to start updating the wiki myself. I did edits in the Oblivion Wiki but only when I was very sure of something and only after talking about it here in theses forums.


I don't know, but realize that the wiki is by no means comprehensive, and is still very much lacking in a lot of departments. I believe that as it stands, the community is now responsible for adding the remainder of any topics not yet covered, though I might be wrong.
User avatar
gemma king
 
Posts: 3523
Joined: Fri Feb 09, 2007 12:11 pm

Post » Tue Jun 19, 2012 8:28 pm

How can you possibly still think it's not documented after Xetrill's post? Because you "discovered" that it will return None if you don't provide a value? Just like it says http://www.creationkit.com/Statement_Reference#Return_Statement (which took all of 5 seconds to find)?

Feel free to fill this thread with all sorts of "undocumented" "discoveries" you make but do us a favor please and keep it off the CK wiki. It's better if it isn't filled with baseless speculative nonsense.
User avatar
Jacob Phillips
 
Posts: 3430
Joined: Tue Aug 14, 2007 9:46 am

Post » Wed Jun 20, 2012 12:02 am

How can you possibly still think it's not documented after Xetrill's post? Because you "discovered" that it will return None if you don't provide a value? Just like it says http://www.creationkit.com/Statement_Reference#Return_Statement (which took all of 5 seconds to find)?

To be fair it does not take 'all of 5 seconds to find'. I tried to use return as well without knowing whether it still existed because I couldn't find anything about it on the Wiki. If you type in 'return' in the search bar you don't get a link to the page you linked to, only useless pages show up that have nothing to do with 'return'. It's good that it still exists and that there is something about it on the Wiki, but finding the information is a whole different story.
User avatar
Alex [AK]
 
Posts: 3436
Joined: Fri Jun 15, 2007 10:01 pm

Post » Wed Jun 20, 2012 9:21 am

To be fair it does not take 'all of 5 seconds to find'. I tried to use return as well without knowing whether it still existed because I couldn't find anything about it on the Wiki. If you type in 'return' in the search bar you don't get a link to the page you linked to, only useless pages show up that have nothing to do with 'return'. It's good that it still exists and that there is something about it on the Wiki, but finding the information is a whole different story.
http://www.creationkit.com/index.php?title=Special%3ASearch&search=return+statement&go=Go

It's the first result.
User avatar
x a million...
 
Posts: 3464
Joined: Tue Jun 13, 2006 2:59 pm

Post » Wed Jun 20, 2012 3:16 am

Perhaps I am being too harsh. But seriously, before you go editing the wiki with stuff like "using return without providing a return value compiles, but short-circuits your script" or whatever else you dream up in your free time, try looking a little harder for things. You'll probably learn something. At the very least, you'll be less likely to learn something wrong :-)
User avatar
anna ley
 
Posts: 3382
Joined: Fri Jul 07, 2006 2:04 am

Post » Wed Jun 20, 2012 7:09 am

If you type in 'return' in the search bar you don't get a link to the page you linked to.
Now it does. (As do the other keywords)


I don't know, but realize that the wiki is by no means comprehensive, and is still very much lacking in a lot of departments. I believe that as it stands, the community is now responsible for adding the remainder of any topics not yet covered, though I might be wrong.

Otherwise it would be a manual. The point of a Wiki ist that you contribute, not just consume.
User avatar
louise tagg
 
Posts: 3394
Joined: Sun Aug 06, 2006 8:32 am

Post » Tue Jun 19, 2012 10:28 pm

wow... did you even READ my OP?

"So assuming that I did not just miss seeing this in the Wiki,"

I was looking for a explanation in the wiki about how this command (or what ever it is in programmer "speak" ) could be used to stop a script the same way it was NORMALLY used in Oblivion.

See here: http://cs.elderscrolls.com/index.php/Return

"Syntax: RETURN

Summary of command

Return is used to force a script to stop processing from that line on. It does not JUST terminate the current block, it terminates the script for the rest of the that iteration of the script in that frame, including the blocks below, if any.


If the script uses a block that runs for multiple frames, such as http://cs.elderscrolls.com/index.php/GameMode, the script will be run again in the next frame. Return can be useful inside of http://cs.elderscrolls.com/index.php/If statements by allowing you to prevent the lines following the return from being processed."



The explanation on the page you gave is not even close to this. And A key word search with the word "RETURN" did NOT get you that page (until JOG fixed this recently I mean).

You sir are the reason only a hand full of people did any real work on the Oblivion Wiki. I sincerely hope you are going to be putting in some 100 or more hours on the Skyrim Wiki because it is people like you that will prevent people like me from trying to help out. I would much prefer to just work on my mods and not use up my free time in the wiki. So really...maybe I should be thanking you...yeah thanks! :glare:



Perhaps I am being too harsh. But seriously, before you go editing the wiki with stuff like "using return without providing a return value compiles, but short-circuits your script" or whatever else you dream up in your free time, try looking a little harder for things. You'll probably learn something. At the very least, you'll be less likely to learn something wrong :-)
User avatar
Jhenna lee Lizama
 
Posts: 3344
Joined: Wed Jun 06, 2007 5:39 am

Post » Tue Jun 19, 2012 11:21 pm

Thanks a lot for making those changes to the wiki, JOG. When the wiki was first opened the http://www.creationkit.com/Keyword_Reference page wasn't particularly useful, but I think it's fast becoming a very useful page. It's a real shame the wiki's search engine requires so much maintenance to make things like this easy to find.

When it comes to finding features of the language that you weren't previously aware of, I've found that the http://www.creationkit.com/Category:Papyrus_Language_Reference category is the best place to look.

Cipscis
User avatar
Eileen Müller
 
Posts: 3366
Joined: Fri Apr 13, 2007 9:06 am

Post » Tue Jun 19, 2012 8:51 pm

wow... did you even READ my OP?

"So assuming that I did not just miss seeing this in the Wiki,"

I was looking for a explanation in the wiki about how this command (or what ever it is in programmer "speak" ) could be used to stop a script the same way it was NORMALLY used in Oblivion.

See here: http://cs.elderscrolls.com/index.php/Return

"Syntax: RETURN

Summary of command

Return is used to force a script to stop processing from that line on. It does not JUST terminate the current block, it terminates the script for the rest of the that iteration of the script in that frame, including the blocks below, if any.


If the script uses a block that runs for multiple frames, such as http://cs.elderscrolls.com/index.php/GameMode, the script will be run again in the next frame. Return can be useful inside of http://cs.elderscrolls.com/index.php/If statements by allowing you to prevent the lines following the return from being processed."



The explanation on the page you gave is not even close to this. And A key word search with the word "RETURN" did NOT get you that page (until JOG fixed this recently I mean).

You sir are the reason only a hand full of people did any real work on the Oblivion Wiki. I sincerely hope you are going to be putting in some 100 or more hours on the Skyrim Wiki because it is people like you that will prevent people like me from trying to help out. I would much prefer to just work on my mods and not use up my free time in the wiki. So really...maybe I should be thanking you...yeah thanks! :glare:
Yeah, I read it. Have you read the entry for 'return' yet? I suspect you haven't. The explanation does a pretty thorough job of explaining what's going on when you use return. Perhaps you should try reading it (or reading it again). And yes, not surprisingly things work rather differently in Papyrus, as the Papyrus VM runs scripts differently than scripts were run in Oblivion.

I don't know about the results of searching for "return" prior to any change, but when I typed "return statement" in the search box that page was the first result. This is before any change made by JOG I believe.

Like I said, perhaps I was a bit harsh, but I stand by my statement that I would rather you not edit the wiki at all than add speculative nonsense to it, as you suggested in this thread. At least perform a more exhaustive search next time.
User avatar
FABIAN RUIZ
 
Posts: 3495
Joined: Mon Oct 15, 2007 11:13 am

Post » Wed Jun 20, 2012 7:05 am

http://www.creationkit.com/index.php?title=Special%3ASearch&search=return+statement&go=Go

It's the first result.

The first result for 'return statement' (which is not exactly the most obvious thing to search for...), 'return' didn't give any useful link, but...

Now it does. (As do the other keywords)

Thanks!
User avatar
Jessica Stokes
 
Posts: 3315
Joined: Fri Jul 28, 2006 11:01 am


Return to V - Skyrim