| SexScripts : Help debugging a script - https://ss.deviatenow.com:443/viewtopic.php?f=4&t=509 | Page 1 of 1 |
Help debugging a script |
Banjo [ Sun Jun 14, 2015 1:28 pm ] |
|---|---|
Hopefully someone can help me with this! I'm getting "null pointer" and "set to null" errors all of a sudden from a new script I'm working on (based around a "Wheel of Fortune" style game). Could someone please take a look and see what's causing this? I've checked for all the things I thought could cause this and the mystery is that it seems to be caused by a new section of code I just added that has nothing to do with the values that show errors. Also, the script seems to run fine regardless (no crashes) despite the error reports. The code blocks I added between no errors and the errors being reported are "loadCustomWheel" and "saveCustomWheel"; for some reason, commenting out the contents of the first ten lines or so of "loadCustomWheel" stops the null errors elsewhere coming up when the script is checked, and for the life of me, I can't figure out why! Thanks in advance, whoever can help me fix what's almost certainly a very simple mistake I've made somewhere! (the images, etc. to go with this script are all already in the "Spanking Game" zip I posted in another thread) |
|
Re: Help debugging a script |
doti [ Sun Jun 14, 2015 3:02 pm ] |
|---|---|
Do you see error when running the script, or only when checking ? The checking can fail for this reason : the second part is a simulation (not fully accurate) - especially, it will read nothing or random value when doing loadXXX() (and save nothing with save(...)). Probably this cause the error you can see. Anyway, it is only the 2nd art, it reach it means the first part (syntax errors) succeeded. |
|
Re: Help debugging a script |
Banjo [ Mon Jun 15, 2015 6:45 am ] |
|---|---|
Thanks for taking a look, Doti. Yes, it seems (I will do further testing) that the errors only come up when checked (I don't use SexScripts' editor to write my scripts, but do use it to check for errors). There is not the usual error popup when I try to run it that you get with a major error in your script, and the script seems to work fine when run. For example, the checker complains about a multiplication of values, but hen run it performs the multiplication and displays the expected results just fine. It also seems to save and load the values I'm asking it to, despite those apparently being the problematic blocks. However, I do note that while many of my scripts get the "completed, but simulation aborted" when checked (which I assume is the simulation failing but not always because of a bug), this one does throw up actual "error on line x" messages, which is why I was confused and concerned. |
|
Re: Help debugging a script |
doti [ Mon Jun 15, 2015 9:29 am ] |
|---|---|
Both (simulation aborted or error in simulation) are possible without real bug. I agree this is not clear, and I'll had some messages about it. |
|
| Page 1 of 1 | All times are UTC + 1 hour [ DST ] |