de en es fr
Let the machine help
Light teasing, exhibition, BDSM, sissyfication, watersports... with sounds and pictures


Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Help debugging a script
PostPosted: Sun Jun 14, 2015 1:28 pm 
Offline
Veteran
User avatar
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! :oops:

(the images, etc. to go with this script are all already in the "Spanking Game" zip I posted in another thread)


Last edited by Banjo on Mon Jun 15, 2015 6:43 pm, edited 1 time in total.

Top
 Profile Send private message 
 
 Re: Help debugging a script
PostPosted: Sun Jun 14, 2015 3:02 pm 
Offline
Site Admin
User avatar
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.


Top
 Profile Send private message 
 
 Re: Help debugging a script
PostPosted: Mon Jun 15, 2015 6:45 am 
Offline
Veteran
User avatar
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.


Top
 Profile Send private message 
 
 Re: Help debugging a script
PostPosted: Mon Jun 15, 2015 9:29 am 
Offline
Site Admin
User avatar
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.


Top
 Profile Send private message 
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 9 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  


Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Maroon Fusion theme created by Oxydo
Software, theme modifications, phpBB modification by Doti 2010 - 2020
This website uses session cookies only.