Announcement
Announcement
| 2nd Quarter Contest Announcement posted! See the Community Announcements section. |
![]() ![]() |
Sep 18 2010, 10:42 PM
Post
#1
|
|
![]() ![]() Type: Coder Alignment: Unaligned |
Script Troubleshooting Tutorial for the Non-Scripter Apologia Most errors that people see from released scripts are not major and can easily be fixed, even by the non-scripter. The purpose of this tutorial is to teach some very basic strategies on diagnosing and fixing common errors without any particularized scripting knowledge. It does not aim to teach you how to script, but simply goes through a few of the most common errors you are likely to encounter when using custom scripts and what can be done about them by yourself, before asking the scripter. In the main part of this tutorial, I will go through some common error messages, what they might mean, and how to fix them. I will not be explaining why these errors occur or why these tips fix them since that requires some knowledge of scripting, and this tutorial is aimed at the non-scripter. If you would like to know, feel free to ask me in this topic and I will explain to the best of my knowledge. Caution Most of the tips in this tutorial do not require you to do any substantial editing to your script, since if that is required, your best strategy is to go to a scripter. However, if you do try to edit a script, do not do so in your main project. It is a lot safer to make a test project and do any editing there, as even small errors on your part may become quite a headache and it's better to be safe. Again, there is nothing in this tutorial that would require you to do any major editing, this caution is mostly just in case you get creative. Don't get creative. General Remember: the first thing to do when encountering any error is to go to the topic where the author published the script and see if anyone else has had the same problem and if the error has been addressed. The easiest fix is the one you don't have to do. Secondly, if this tutorial does help you to fix the error, then you should still alert the author of the script to the error. It is a simple courtesy and one which you should always undertake, as scripters want their scripts to be bug-free. Also, some common errors, such as the bug where you can't set a variable to the stats of an actor, are bugs in the default scripts and not the result of any custom script. A good set of fixes for these can be found in Yanfly's Core Fixes and Upgrades. Check those out and see if the bug you are getting is resolved by one of those scripts. Common Errors
Script Incompatibilities The most common reason for a script not to work properly is a conflict with another script. If none of the above tips resolve your error, then you should look into the possibility that it is a script incompatibility. The first thing to do is confirm whether it is a script incompatibility. To do this, make a new project and recreate the error-throwing situation. Then move the problem script into that project. If the error does not occur, then it is a script incompatibility. If it is, then you have to identify which other script is causing the problem. Move each of your other scripts into the clean project one by one until the error occurs. The last script you added is the conflicting script. Now that you know which scripts are problematic, try switching their order in the Script Editor. In other words, if Script X is above Script Y, move Script Y above Script X. Try running the project again and see if the error occurs. If it does then there's not much more you can do by yourself. However, your work in identifying the errors is not all for naught. Alert the authors of both scripts to the incompatibility and ask them for help. The fact that you have already identified the incompatible script and have a clean project with only the error situation in it means that they will probably be much more motivated to help you as half their job is done. Closing Note There are probably a bunch of other common and simple little errors I didn't think of when writing this tutorial. If you can think of any, then just bring them to my attention and if there is likely to be a simple fix then I will add it to this tutorial. Also, remember that even if your bug is fixed by following the tips in this tutorial, you should always report errors to the author of the script as a courtesy. Moreover, if your bug is not fixed by the tips in the tutorial, you should always ask the author of the script first and, if he/she refuses, then post a topic asking for help from other scripters. This post has been edited by modern algebra: Jul 12 2011, 12:33 PM -------------------- |
|
|
|
Sep 19 2010, 01:42 AM
Post
#2
|
|
![]() I demand cookies. ![]() Type: Coder Alignment: Neutral Good |
Well done MA.
This is a very IMPORTANT Tut, or maybe a guide. I hope others will read this! -------------------- Spoiler: To be Hexa-fied Spoiler: Spoiler: |
|
|
|
Sep 19 2010, 01:57 AM
Post
#3
|
|
![]() ![]() Type: Coder Alignment: Unaligned |
I'm glad you like it. Hopefully some non-scripters will find the tips helpful as well
-------------------- |
|
|
|
Sep 19 2010, 10:29 AM
Post
#4
|
|
|
Discotheque ♥ Love ![]() Type: Writer Alignment: True Neutral |
Thanks for this. I keep on getting the NoMethodError, only to find out that it's from old save files. =_=
Thanks m.a. -------------------- Spoiler: ![]() |
|
|
|
Sep 19 2010, 10:31 AM
Post
#5
|
|
![]() Preußischer Generalfeldmarschall ![]() Type: Artist Alignment: Neutral Good |
I'm glad you like it. Hopefully some non-scripters will find the tips helpful as well I'm absolutely positive that they will Much thanks, Modern Algebra -------------------- My Projects:
![]() Supported Projects: Spoiler: But the age of chivalry is gone. That of sophisters, economists, and calculators, has succeeded; and the glory of Europe is extinguished for ever. Never, never more shall we behold that generous loyalty to rank and sex, that proud submission, that dignified obedience, that subordination of the heart, which kept alive, even in servitude itself, the spirit of an exalted freedom. The unbought grace of life, the cheap defense of nations, the nurse of manly sentiment and heroic enterprise, is gone! --Edmund Burke |
|
|
|
Sep 19 2010, 02:38 PM
Post
#6
|
|
![]() ![]() Type: Coder Alignment: Unaligned |
Thanks for the nice comments. I added a couple more common errors and simple fixes.
-------------------- |
|
|
|
Jul 2 2011, 11:44 PM
Post
#7
|
|
![]() Type: Undisclosed |
Nice work but i have a problem how can i fix :
Script 'Scene_Title' line 81:TypeError |
|
|
|
Jul 3 2011, 01:11 AM
Post
#8
|
|
![]() No method: 'stupid_title' found for 'nil:NilClass` ![]() Type: Coder Alignment: Chaotic Good |
Moved to RGSS2 support, link retained in the tutorials forum, and stickied. This is useful stuff, thanks MA.
-------------------- My blog - It's awesome, I assure you
QUOTE While sloppy writing does not invariably mean sloppy thinking, we've generally found the correlation to be strong -- and we have no use for sloppy thinkers. If you can't yet write competently, learn to. - Eric Raymond ---![]() My awards for being so awesome Spoiler: |
|
|
|
Jul 3 2011, 07:16 AM
Post
#9
|
|
![]() Type: Undisclosed Alignment: Unaligned |
Here's another error that comes up on occasion: http://www.rpgmakervx.net/index.php?s=&...st&p=154650
Script 'Cache' line 80: RGSSError occurred. Failed to create bitmap ... This problem is most likely caused by either an invalid or blank image file trying to be loaded, or another file with the same name as the image file trying to be loaded in the same directory that is not an image file your Title folder should hold only valid images and only one of each by any given name (Bitmap class will load the first file with the name, regardless of the extension)...
-------------------- I no longer support Tankentai.
|
|
|
|
Jul 6 2011, 01:19 AM
Post
#10
|
|
![]() ![]() Type: Artist Alignment: Neutral Good |
Yay!, thanks for the tutorial this will actually help me a lot. thumbs bro.
-------------------- |
|
|
|
Jul 6 2011, 03:00 PM
Post
#11
|
|
![]() Type: Coder |
Mr Bubble, I would like to add to that comment by Mithran on that. This also happens anytime you try to generate a bitmap (Bitmap.new) using a width or height of 0 or lesser. I have seen this in a couple scripts when things go wrong.
|
|
|
|
Jul 8 2011, 04:07 PM
Post
#12
|
|
![]() ![]() Type: Coder Alignment: Unaligned |
Thanks for the sticky
Thanks Mr. Bubble (and Mithran); I will add that error to the list. Thanks also GubiD for the clarification, though if the error occurs when trying to generate a bitmap with a width or height of 0 or less, then it is likely a logic error where the scripter didn't anticipate that the variable he/she passed to the Bitmap could go less than 0, and in that case a non-scripter would probably not be able to fix it by him or herself. Though, I suppose it could also be a configuration error on the part of the user and it would be useful to mention it at least. -------------------- |
|
|
|
Jul 11 2011, 01:37 AM
Post
#13
|
|
![]() Type: Undisclosed Alignment: Unaligned |
QUOTE Similarly, this error can occur if the width and height are too large, and that may occur where a script generates the size of a Bitmap depending on how many items are to be listed in the window. That can happen if you have, for instance, lots of different stacks of items in Scene_Item. Yanfly wrote a fix for that in her Core Fixes and Upgrades, though it is not a perfect fix as it will cut off the offending items in the list. As far as I know, there is no perfect general fix for it, but a scripter might be able to whip something up for you by, for instance, swapping bitmaps. The other thing you could do is reduce the number of items that will appear in the list at any given time. I'm not sure if this perfectly fixes this issue, but Mithran made a fix for this quite some time ago. Window Selectable Max 2.0 -------------------- I no longer support Tankentai.
|
|
|
|
Jul 11 2011, 11:36 AM
Post
#14
|
|
![]() ![]() Type: Coder Alignment: Unaligned |
Cool - I had never seen that before. I added it to the first post there.
-------------------- |
|
|
|
Jul 19 2011, 02:19 AM
Post
#15
|
|
![]() Type: Designer Alignment: Unaligned |
I got to say, this is probably one of the most helpful tuts I've read
Helped me pinpoint some issues. :3 just wanted to say thank you. This post has been edited by Leonlionheart: Jul 19 2011, 02:20 AM -------------------- ![]() |
|
|
|
Jul 22 2011, 10:47 AM
Post
#16
|
|
![]() ![]() Type: Coder Alignment: Unaligned |
I'm glad that you found it useful
-------------------- |
|
|
|
![]() ![]() |
| Lo-Fi Version | Time is now: 25th May 2013 - 10:50 AM |
|
|