Hi! Welcome to the forum for Platinum Arts Sandbox Free 3D Game Maker. I currently have the forums locked as I am attempting to properly update them.

In the meantime please join the new Discord Server!

If you have any questions please e-mail me through the Platinum Arts website.

2.6.1 cfg corruption + fix

Having issues not related to a specific Sandbox game mode? Get help here!
Please also read the rules for support when posting support requests.
Failure to comply with the forum rules may result in your topic being locked without resolution.
Locked
Hirato
Developer
Developer
Posts: 689
Joined: May 30th, 2009, 1:23 pm
IRC Username: hirato

2.6.1 cfg corruption + fix

Post by Hirato »

Version 2.6.1 of sandbox introduces a new cubescript parser.
While it works well, it changes a few things some of our scripts depend on.

This results in one of our scripts producing some variant of the following, which is saved in the cfg.

Code: Select all

"guirolloverimgpath" = [packages/base//fps/DTFTA]
For those not familiar with cubescript, "fps/DTFTA]" is essentially a comment.
This means that the ] isn't parsed and that the whole cfg is therefor rendered null and void.

As for the script that generated it, the problem itself is that "" isn't interpreted as false with the new parser.
This is a bug and has recently been fixed upstream - we'll be importing the changes into our SVN soon.

The Workaround
If you're using the menus to load maps, I'm certain you're absolutely sick of this.
So without further ado, the workaround.

First, open data/menus.cfg

Next, look for the following code

Code: Select all

showmapshot = [
	guibar
	guilist [
		guiimage (format "packages/base/%1%2%3" $arg1 (if $arg1 [result "/"]) (at $guirollovername 0)) $guirolloveraction 5 1 "data/sandboxlogo"
		guitext $guirollovername
	]
]
Now, replace it with the following

Code: Select all

showmapshot = [
	guibar
	guilist [
		if $numargs [
			guiimage (format "packages/base/%1/%2" $arg1 (at $guirollovername 0)) $guirolloveraction 5 1 "data/sandboxlogo"
		] [
			guiimage (format "packages/base/%1" (at $guirollovername 0)) $guirolloveraction 5 1 "data/sandboxlogo"
		]
		guitext $guirollovername
	]
]
Now save the file, and you're done.
This will hopefully mean the end of these issues.

To the afflicted
If you are affected, please delete your config_*.cfg files or follow the main menu to options and click "restore defaults"
This is not a url, clicking it is pointless
User avatar
Leo_V117
Support Team
Support Team
Posts: 1640
Joined: February 16th, 2010, 8:00 pm
Name: Leo
IRC Username: Leo_V117
Location: That one place...
Contact:

Re: 2.6.1 cfg corruption + fix

Post by Leo_V117 »

I was beginning to think that the corruptions were down to errors within custom scripts and codes... not the stock codes.

Well, if you say it fixes it... then it fixes it! :D

Are you gonna apply this to the SVN?
Hirato
Developer
Developer
Posts: 689
Joined: May 30th, 2009, 1:23 pm
IRC Username: hirato

Re: 2.6.1 cfg corruption + fix

Post by Hirato »

no, I'll be importing appropriate fixes from upstream soon though.

For other reasons, the stock scripts would most likely need to be re-examined and modified to use cubescript correctly.
This is not a url, clicking it is pointless
User avatar
Thunder28X
Member
Member
Posts: 4
Joined: June 25th, 2011, 10:26 pm
Location: Right behind you.
Contact:

Re: 2.6.1 cfg corruption + fix

Post by Thunder28X »

Hirato wrote:Version 2.6.1 of sandbox introduces a new cubescript parser.
While it works well, it changes a few things some of our scripts depend on.

This results in one of our scripts producing some variant of the following, which is saved in the cfg.

Code: Select all

"guirolloverimgpath" = [packages/base//fps/DTFTA]
For those not familiar with cubescript, "fps/DTFTA]" is essentially a comment.
This means that the ] isn't parsed and that the whole cfg is therefor rendered null and void.

As for the script that generated it, the problem itself is that "" isn't interpreted as false with the new parser.
This is a bug and has recently been fixed upstream - we'll be importing the changes into our SVN soon.

The Workaround
If you're using the menus to load maps, I'm certain you're absolutely sick of this.
So without further ado, the workaround.

First, open data/menus.cfg

Next, look for the following code

Code: Select all

showmapshot = [
	guibar
	guilist [
		guiimage (format "packages/base/%1%2%3" $arg1 (if $arg1 [result "/"]) (at $guirollovername 0)) $guirolloveraction 5 1 "data/sandboxlogo"
		guitext $guirollovername
	]
]
Now, replace it with the following

Code: Select all

showmapshot = [
	guibar
	guilist [
		if $numargs [
			guiimage (format "packages/base/%1/%2" $arg1 (at $guirollovername 0)) $guirolloveraction 5 1 "data/sandboxlogo"
		] [
			guiimage (format "packages/base/%1" (at $guirollovername 0)) $guirolloveraction 5 1 "data/sandboxlogo"
		]
		guitext $guirollovername
	]
]
Now save the file, and you're done.
This will hopefully mean the end of these issues.

To the afflicted
If you are affected, please delete your config_*.cfg files or follow the main menu to options and click "restore defaults"
It didn't work. I replaced the code and started up RPG mode and it didn't work, so I used FPS mode to restore to defaults and it still didn't work. Does this mean I'll have to re-install Sandbox entirely?
Hirato
Developer
Developer
Posts: 689
Joined: May 30th, 2009, 1:23 pm
IRC Username: hirato

Re: 2.6.1 cfg corruption + fix

Post by Hirato »

Thunder28X wrote:It didn't work. I replaced the code and started up RPG mode and it didn't work, so I used FPS mode to restore to defaults and it still didn't work. Does this mean I'll have to re-install Sandbox entirely?
Hirato wrote:To the afflicted
If you are affected, please delete your config_*.cfg files or follow the main menu to options and click "restore defaults"
*ahem*
If you're having trouble finding the cfg files, check ~/.platinumarts (Linux), VirtualStore (Windows) or the my_stuff sub folder (Windows)
Also reinstalling sandbox will not help if you have old configuration files lying about.
This is not a url, clicking it is pointless
User avatar
Thunder28X
Member
Member
Posts: 4
Joined: June 25th, 2011, 10:26 pm
Location: Right behind you.
Contact:

Re: 2.6.1 cfg corruption + fix

Post by Thunder28X »

Ahhh I see what happened now. Thank you very much! :)
Locked