Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

script with CD problem NEED HELP!!!!

well i made the CD with everything on it, works fine nothing to download since it runs off the disc, just one problem, when i go on to an another computer to beta test the CD i cant save this error pops up, denied because of line 5266 on sdk 2.3 and it about saveing not opening or loading

this is what the lines says

line 5266 file = File.open(filename, "wb")

and its not the filename, it has to do with direct saving off of a CD, on the computer with the files it works, im talking about a computer that hasnt have any rmxp files at all, and yes the CD has all the files to run itself if you ask

it may be part of SDK but its the same in the ruby script, so im not sure what to do
 

khmp

Sponsor

I believe that line is trying to save/write a file to the active directory of where the script is being executed which is a cd-rom, read only memory. Can't write to it. Whatever files were on that disc need to be placed somewhere on the pc you are trying to test it on. But I don't have that much knowledge about it having never created one.
 

OS

Sponsor

Did you try overriding the SDK's Scene_File classes? You may be required to set the directory to a specific location on the computer to load/save files from/to.

I'm not entirely sure, but I suggest trying that, if you haven't.

Sorry if this post was useless. Peace.
 

khmp

Sponsor

If you can utilize Win32API use the function RegQueryValue in advapi32.dll. To my dismay I've never been able to use Win32API in the script editor. I keep getting errors when I use the require statement. But below I put all the documentation I could find about it. I know its probably a lot more in depth for what you want to do but if you want to stick to a read only memory disc then you're going to have to either hard code a path which will work most of the time assuming they kept C:\ as main or find out through the registry that information. And of course Vista wants to be different and the key location for my documents is different than 95,98,ME,2000,XP. But Rai suggested a good idea with putting it on a memory stick or pen drive, it'll read and write.

http://msdn2.microsoft.com/en-us/library/ms724909.aspx
http://www.windowsnetworking.com/kb...stomization/Windows2000MyDocumentsFolder.html
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top