200AB
|
  |
| Joined: 24 Aug 2010 |
| Total Posts: 1604 |
|
|
| 25 May 2012 07:45 PM |
Yeah, so I'm getting trolled by Roblox. D:
The subject explains it all.
Literally all I'm doing is player:SaveInstance((a string property for key),nil) and it errors: >Cannot save a null instance
Okay, herp-derp Roblox, how do you suppose I delete a Saved instance, then? |
|
|
| Report Abuse |
|
|
200AB
|
  |
| Joined: 24 Aug 2010 |
| Total Posts: 1604 |
|
| |
|
200AB
|
  |
| Joined: 24 Aug 2010 |
| Total Posts: 1604 |
|
| |
|
200AB
|
  |
| Joined: 24 Aug 2010 |
| Total Posts: 1604 |
|
|
| 25 May 2012 08:21 PM |
This makes no sense, everywhere in the wiki, and in common DP knowledge it's said that in order to delete a saved-instance you just have to save nil to it, to delete a saved-number you just have to save 0 to it, and to delete a saved-string you have to save "" to it. So, how come when I'm trying to save nil to a SaveInstance I get an error saying that I cannot save a null (<- output says null, when in Lua it's nil) instance.
I've looked everywhere for a solution now, well searched google quite a few times using different words, and I can't find any solutions, any, well, anything for this. |
|
|
| Report Abuse |
|
|
200AB
|
  |
| Joined: 24 Aug 2010 |
| Total Posts: 1604 |
|
| |
|
|
| 25 May 2012 08:29 PM |
| Why not save the instance, then destroy it without saving??? |
|
|
| Report Abuse |
|
|
200AB
|
  |
| Joined: 24 Aug 2010 |
| Total Posts: 1604 |
|
|
| 25 May 2012 08:30 PM |
Lolwut?
That makes no sense. |
|
|
| Report Abuse |
|
|
|
| 25 May 2012 08:41 PM |
Nevermind, thought it was something else.
So you went:
SaveInstance(Nil,key)
? |
|
|
| Report Abuse |
|
|
200AB
|
  |
| Joined: 24 Aug 2010 |
| Total Posts: 1604 |
|
|
| 25 May 2012 08:45 PM |
Lol, no.. That wouldn't work at all, seeing as how it's SaveInstance(key,value), so I went SaveInstance((the key),nil) |
|
|
| Report Abuse |
|
|
|
| 25 May 2012 08:48 PM |
| Nope, you have it backwards, that's your problem. |
|
|
| Report Abuse |
|
|
Legend26
|
  |
| Joined: 08 Sep 2008 |
| Total Posts: 10586 |
|
|
| 25 May 2012 08:51 PM |
| It's indeed SaveInstance(string, object), I'm not sure how you're gonna delete it then if it's going to error like that... |
|
|
| Report Abuse |
|
|
200AB
|
  |
| Joined: 24 Aug 2010 |
| Total Posts: 1604 |
|
|
| 25 May 2012 08:54 PM |
>It's indeed SaveInstance(string, object), I'm not sure how you're gonna delete it then if it's going to error like that...
Ikr?! RAGE. D:<
Also, for anyone saying it's a syntax error, just look at the error... 'Cannot save a null instance', what part of that suggests a syntax error? |
|
|
| Report Abuse |
|
|
|
| 25 May 2012 09:02 PM |
Erm...
SaveInstance(string, object) player:SaveInstance((a string property for key),nil)
Well, nil isn't an object. LOL.
MrMcAero |
|
|
| Report Abuse |
|
|
|
| 25 May 2012 09:02 PM |
| Oh darn, read the wiki wrong! =P |
|
|
| Report Abuse |
|
|
200AB
|
  |
| Joined: 24 Aug 2010 |
| Total Posts: 1604 |
|
|
| 25 May 2012 09:05 PM |
*facepalm*
Are you serious?
Read the wiki about data persistence, they added a way for each Save function to delete data, for SaveInstance it's nil, for SaveString it's "", for SaveNumber it's 0. (SaveBoolean I guess doesn't have one, never mentioned) |
|
|
| Report Abuse |
|
|
200AB
|
  |
| Joined: 24 Aug 2010 |
| Total Posts: 1604 |
|
|
| 25 May 2012 09:06 PM |
| And that was @BuildPersonalServer btw, forgot to say. |
|
|
| Report Abuse |
|
|
200AB
|
  |
| Joined: 24 Aug 2010 |
| Total Posts: 1604 |
|
|
| 25 May 2012 09:27 PM |
| I really need a solution, but I have no idea what the solution would possible be. |
|
|
| Report Abuse |
|
|
200AB
|
  |
| Joined: 24 Aug 2010 |
| Total Posts: 1604 |
|
|
| 25 May 2012 09:54 PM |
I'm not letting this go.
Bump. |
|
|
| Report Abuse |
|
|
200AB
|
  |
| Joined: 24 Aug 2010 |
| Total Posts: 1604 |
|
| |
|
|
| 25 May 2012 11:05 PM |
| Replace the instance with an explosion? |
|
|
| Report Abuse |
|
|
200AB
|
  |
| Joined: 24 Aug 2010 |
| Total Posts: 1604 |
|
|
| 25 May 2012 11:08 PM |
| How would that delete it? An explosion is an existing object, therefore it will save that object, not nil. o-o |
|
|
| Report Abuse |
|
|
200AB
|
  |
| Joined: 24 Aug 2010 |
| Total Posts: 1604 |
|
|
| 01 Jun 2012 12:27 PM |
I waited awhile to see if it was just a bug that would go away, but just tried again, still happening.
Is there somewhere else I should go with this that will get the attention of someone that can actually help me with this? (Like a roblox developer) Because this isn't a scripting error, it's a bug with SaveInstance. |
|
|
| Report Abuse |
|
|
av83r
|
  |
| Joined: 28 Jul 2009 |
| Total Posts: 2580 |
|
|
| 01 Jun 2012 12:29 PM |
| change the instance to 0 instead of nill. Probably not exactly what you want, but it will work. |
|
|
| Report Abuse |
|
|
200AB
|
  |
| Joined: 24 Aug 2010 |
| Total Posts: 1604 |
|
|
| 01 Jun 2012 12:34 PM |
| @av83r I knew that wouldn't work because it's a number value, SaveInstance needs to have a object value, but just to make sure I tried anyway, and just as I suspected it generated a "cannot cast value to object" error. |
|
|
| Report Abuse |
|
|
200AB
|
  |
| Joined: 24 Aug 2010 |
| Total Posts: 1604 |
|
| |
|