[Gambas-user] Settings

Randall Morgan rmorgan62 at ...626...
Mon Jul 28 06:38:43 CEST 2014


I ran your code and at first I got an error on a line like
Settings["HighScore"] = SprEngine.Highscore. I commented that out and run
the code and found the settings file was not created (this should be
flagged as an error if the file does not already exist...)

Next, I commented out all your code and in the Setup_game() method I did:

Public Sub Startup_game()
  GameEngine.ClearAllSprites()
  Settings["Test"] = "1"
  Settings.Save()
...

I then compiled and ran the code and the settings file was created. I think
your issue is with one of the settings you try to set. Try printing every
variable or property just before adding it to the settings object and see
if you get expected results.

I'm sorry for the delay'd response but I am in a remote area and have to
log into my development machine remotely, and the connection where I am
sucks!

Hope this helps!




On Sun, Jul 27, 2014 at 8:35 PM, Randall Morgan <rmorgan62 at ...626...> wrote:

> Must be too big on your end. I know I and others have sent larger files...
> But the link works also. I'll look at your code and get back to you.
>
>
>
>
> On Sun, Jul 27, 2014 at 8:21 PM, Shane <shanep1967 at ...169...> wrote:
>
>> yep to big try this
>>
>>
>> https://drive.google.com/file/d/0B7AcxnE14xeaLVFDUGhja19NcUU/edit?usp=sharing
>>
>> On 28/07/14 11:54, Shane wrote:
>> > I'll try its 3.8MB is that to big ?
>> >
>> > On 28/07/14 11:38, Randall Morgan wrote:
>> >> Can you attached your project?
>> >>
>> >>
>> >> On Sun, Jul 27, 2014 at 6:46 PM, Shane <shanep1967 at ...169...> wrote:
>> >>
>> >>> Something strange is going on here i just put in the code " Print
>> >>> Settings.Path " and i get the same error
>> >>> but the settings in my other projects work fine?
>> >>>
>> >>> On 28/07/14 10:35, Shane wrote:
>> >>>> still not working i even changed the project name but i still get the
>> >>>> same error and there are no files in the setting dir with my project
>> >>>> name. I think from memory there was at some stage but i deleted it to
>> >>>> see if that would fix the problem. Is there anywhere that gambas
>> keeps a
>> >>>> record of this file?
>> >>>>
>> >>>> On 27/07/14 17:39, Matti wrote:
>> >>>>> Have a look at http://gambaswiki.org/wiki/comp/gb.settings for the
>> >>> structure of the settings file.
>> >>>>> And look at http://gambaswiki.org/wiki/comp/gb.settings/settings
>> how
>> >>> to save a value.
>> >>>>> So, the syntax is Settings["High_Score/xxx"] = HighScore.
>> >>>>> Regards, Matti
>> >>>>>
>> >>>>> Am 27.07.2014 05:02, schrieb Shane:
>> >>>>>> I'm getting file already exists error when trying to run this code
>> >>>>>> Settings["High_Score"] = HighScore
>> >>>>>> am i doing this the right way? also this is a sdl program.
>> >>>>>>
>> >>>>>>
>> >>>>>> [System]
>> >>>>>> Gambas=3.5.90
>> >>>>>> OperatingSystem=Linux
>> >>>>>> Kernel=3.8.0-35-generic
>> >>>>>> Architecture=x86_64
>> >>>>>> Distribution=Linux Mint 15 Olivia
>> >>>>>> Desktop=GNOME
>> >>>>>> Theme=QGtk
>> >>>>>> Language=en_AU.UTF-8
>> >>>>>> Memory=3808M
>> >>>>>> [Libraries]
>> >>>>>> Cairo=libcairo.so.2.11200.14
>> >>>>>> Curl=libcurl.so.4.3.0
>> >>>>>> DBus=libdbus-1.so.3.7.2
>> >>>>>> GStreamer=libgstreamer-0.10.so.0.30.0
>> >>>>>> GStreamer=libgstreamer-1.0.so.0.6.0
>> >>>>>> GTK+3=libgtk-3.so.0.600.4
>> >>>>>> GTK+=libgtk-x11-2.0.so.0.2400.17
>> >>>>>> OpenGL=libGL.so.1.2.0
>> >>>>>> Poppler=libpoppler.so.28.0.0
>> >>>>>> Qt4=libQtCore.so.4.8.4
>> >>>>>> SDL=libSDL-1.2.so.0.11.4
>> >>>>>>
>> >>>>>>
>> >>>
>> ------------------------------------------------------------------------------
>> >>>>>> Want fast and easy access to all the code in your enterprise?
>> Index and
>> >>>>>> search up to 200,000 lines of code with a free copy of Black Duck
>> >>>>>> Code Sight - the same software that powers the world's largest code
>> >>>>>> search on Ohloh, the Black Duck Open Hub! Try it now.
>> >>>>>> http://p.sf.net/sfu/bds
>> >>>>>> _______________________________________________
>> >>>>>> Gambas-user mailing list
>> >>>>>> Gambas-user at lists.sourceforge.net
>> >>>>>> https://lists.sourceforge.net/lists/listinfo/gambas-user
>> >>>>>>
>> >>>
>> ------------------------------------------------------------------------------
>> >>>>> Want fast and easy access to all the code in your enterprise? Index
>> and
>> >>>>> search up to 200,000 lines of code with a free copy of Black Duck
>> >>>>> Code Sight - the same software that powers the world's largest code
>> >>>>> search on Ohloh, the Black Duck Open Hub! Try it now.
>> >>>>> http://p.sf.net/sfu/bds
>> >>>>> _______________________________________________
>> >>>>> Gambas-user mailing list
>> >>>>> Gambas-user at lists.sourceforge.net
>> >>>>> https://lists.sourceforge.net/lists/listinfo/gambas-user
>> >>>>>
>> >>>>>
>> >>>
>> ------------------------------------------------------------------------------
>> >>>> Infragistics Professional
>> >>>> Build stunning WinForms apps today!
>> >>>> Reboot your WinForms applications with our WinForms controls.
>> >>>> Build a bridge from your legacy apps to the future.
>> >>>>
>> >>>
>> http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
>> >>>> _______________________________________________
>> >>>> Gambas-user mailing list
>> >>>> Gambas-user at lists.sourceforge.net
>> >>>> https://lists.sourceforge.net/lists/listinfo/gambas-user
>> >>>>
>> >>>>
>> >>>
>> >>>
>> ------------------------------------------------------------------------------
>> >>> Infragistics Professional
>> >>> Build stunning WinForms apps today!
>> >>> Reboot your WinForms applications with our WinForms controls.
>> >>> Build a bridge from your legacy apps to the future.
>> >>>
>> >>>
>> http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
>> >>> _______________________________________________
>> >>> Gambas-user mailing list
>> >>> Gambas-user at lists.sourceforge.net
>> >>> https://lists.sourceforge.net/lists/listinfo/gambas-user
>> >>>
>> >>
>> >
>> >
>> ------------------------------------------------------------------------------
>> > Infragistics Professional
>> > Build stunning WinForms apps today!
>> > Reboot your WinForms applications with our WinForms controls.
>> > Build a bridge from your legacy apps to the future.
>> >
>> http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
>> > _______________________________________________
>> > Gambas-user mailing list
>> > Gambas-user at lists.sourceforge.net
>> > https://lists.sourceforge.net/lists/listinfo/gambas-user
>> >
>> >
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Infragistics Professional
>> Build stunning WinForms apps today!
>> Reboot your WinForms applications with our WinForms controls.
>> Build a bridge from your legacy apps to the future.
>>
>> http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
>> _______________________________________________
>> Gambas-user mailing list
>> Gambas-user at lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/gambas-user
>>
>
>
>
> --
> If you ask me if it can be done. The answer is YES, it can always be done.
> The correct questions however are... What will it cost, and how long will
> it take?
>



-- 
If you ask me if it can be done. The answer is YES, it can always be done.
The correct questions however are... What will it cost, and how long will
it take?



More information about the User mailing list