Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / [LOCKED] AGK Temporary Bug Report Thread

Author
Message
Rich Dersheimer
AGK Developer
14
Years of Service
User Offline
Joined: 1st Jul 2009
Location: Inside the box
Posted: 29th Aug 2011 09:17 Edited at: 31st Aug 2011 04:44
Here's a weird one...

I'm gathering input from the user, with a function that does the "GetTextInput"ing. Then I check to see if it's null. Here's the code...



I have this same call and test for about a dozen different pieces of data. But now, all of a sudden, halfway through the code, the very last one I put in is causing the program to stop running.

If I change this one particular test to



it works fine. But I can never ever use the string match test again in the program, or it crashes. I tried having the function return "INVALID" if the user enters a null, and testing the return string for that, but it still crashes.

I have to use the zero length test from that point on in the program.

So... is there some kind of limit on checking for string matching?

EDIT: And now, adding a line that creates a text object is crashing the program. It's the dreaded
Quote: "
Process terminated with status -1073741819 (0 minutes, 6 seconds)"

This line



crashes the program. I've tried copying all the code to notepad, making a new project, and pasting the code back in, no joy. I am dead in the water if I can't add any more code to my program.
Man, I've got 1500 lines of code in this project, I'd hate to have to start over.

MORE EDIT: The two things seem to be related. I went back and replaced all the if return$ <> "" with if len(return$) <> 0 and now I can add more text entities. I changed 8 of them, so we'll see if that lets me put in 8 more text objects.

EVEN MORE EDIT: There is definitely a problem with CreateText and the number of times you can use it. I'm not sure what the limit is, but I have hit it. I can't add any more text entities without either getting an error, or having previously created text objects display corrupted string data.

I've got half a dozen info windows in a program, each time the user opens one, I've been creating the text objects for the window (title, heading, helpful notes, labels, etc.) and then when the user closes the window, I've been deleting the text objects.

Now, I'm going to try creating them all at the beginning of the program, and re-using them, instead of create/delete.

AGAIN WITH THE EDIT: I think I'm narrowing down the problem. By limiting the program to just a couple dozen text objects, and re-using them instead of delete/re-creating them, I think the crashes are going away. Knock on wood.

mnf
12
Years of Service
User Offline
Joined: 29th Aug 2011
Location: Shetland
Posted: 29th Aug 2011 12:13
I've just purchased AppGameKit - and looks excellent. However, a quick bug report - everything compiles in debug mode (VS2008) but in release mode the paths are incorrectly set in the example projects. (..\..\..\..\IDE\common\Include in debug but ..\..\..\..\common\ in release - so AGK.h not found - linking also fails if this is corrected, so linker paths incorrect too)

Martin

PS - web form clears if captcha entered incorrectly - aaaarrrrggghhh
Rich Dersheimer
AGK Developer
14
Years of Service
User Offline
Joined: 1st Jul 2009
Location: Inside the box
Posted: 31st Aug 2011 01:10
Undim doesn't work. It doesn't highlight as a command in the IDE, and using it in a program halts the compile with Unknown Instruction 0.



Silvester
18
Years of Service
User Offline
Joined: 7th Dec 2005
Location: Netherlands
Posted: 31st Aug 2011 13:33
Not sure if this is a bug, or a slow backbuffer.. But whenever I fade out a sprite setting the alpha level to zero, and then try to hide it it re-appears at full opacity for a split second before actually dissapearing.
Bursar
15
Years of Service
User Offline
Joined: 17th Sep 2008
Location:
Posted: 31st Aug 2011 13:48
I ran into this last night, and I think it's to do with the alpha going below 0. If I start alpha at 255 and reduce it by 10 every step, then it will evetually get to -5 and I see the sprite reappear at full brightness.

If I reduce it by 5 every step, it neatly ends on 0 and the sprite fades out properly.
Silvester
18
Years of Service
User Offline
Joined: 7th Dec 2005
Location: Netherlands
Posted: 31st Aug 2011 13:50 Edited at: 31st Aug 2011 13:55
I assumed the same thing, but oddly enough my code decreases it by steps of 1, and caps out if it runs below 5, then exits the loop and hides it altogether. I made this change because I thought that was what caused it, as the documentation does state it doesn't take well to values below zero and above 255.

EDIT: I just tried this on the computer at class(The one I am currently using) and it doesn't appear to do this when I limit it at 5, but it does when I let it run up to "if <0" as a boundary. So this is something that does happen when you input negative values.

Now I'm just puzzled what causes it to keep doing this on my own desktop regardless of what I cap it out on.
mnf
12
Years of Service
User Offline
Joined: 29th Aug 2011
Location: Shetland
Posted: 31st Aug 2011 16:49
Since Alpha is an 8 bit value -5 = 251, so yes it should reappear. Stop at 0.

Martin
Bursar
15
Years of Service
User Offline
Joined: 17th Sep 2008
Location:
Posted: 31st Aug 2011 23:58
Not sure what's going on when building an application, but I have renamed my project, and clicking on Run loads the old exe.

I have to manually delete the exe, click Run, and then have it complain about the project not having been built before. Once a fresh exe is built, it works.

Clicking Compile, Run and Broadcast works as expected, even with the old exe in place.

Also, I'm not sure about the timestamps that are used when the exe is built either. I deleted my exe and built a fresh version. The file properties say:

Created: 31 August 2011, 20:40:49
Modified: 30 August 2011, 22:22:32
Accessed: 31 August 2011, 21:50:45

The Accessed timestamp is the correct one for when the app was built, but by default, Windows Explorer shows me the Modified date, which is the most wrong of the lot.

Is AppGameKit doing something odd with times when building the exe, or is it Windows?
Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 1st Sep 2011 01:55 Edited at: 1st Sep 2011 01:55
The exe is not modified when building, it is merely copied from IDE/Compiler/interpreters/Windows.exe and used to run your bytecode.
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 1st Sep 2011 04:05
Try this.

It ends up playing through all of the music files instead of looping the first. Even if I use the play once parameter, it still plays through all the loaded tunes. Most assuredly a bug! It has drove me mad for the last hour thinking it was something to do with my game logic.

Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 1st Sep 2011 04:26
There are two more parameters on PlayMusic() that limit how many tracks are played.
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 1st Sep 2011 04:49
Ah.. That would explain a lot. Thank you!

Bursar
15
Years of Service
User Offline
Joined: 17th Sep 2008
Location:
Posted: 1st Sep 2011 10:37
The GetRawMouse commands don't seem to be working as intended.

GetRawMouseLeftPressed and GetRawMouseRightPressed are triggered for as long as the mouse button is held down, and so functions the same as GetRawMouseLeftState and GetRawMouseRightState. I was under the impression it should just trigger once, much like GetPointerPressed.

GetRawMouseLeftReleased and GetRawMouseRightReleased has the same problem, but in reverse. Without pressing a mouse button, nothing happens - as expected. When pressing a mouse button - nothing happens. Also good. When releasing the mouse button, the event is constantly triggered until you press the mouse button again to stop it. And then it again fires constantly once you release the button. I thought it should just fire once, similar to GetPointerReleased.
Mobiius
Valued Member
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 1st Sep 2011 12:45
Is it possible we can have the following commands:

GetMusicFileVolume
GetMusicSystemVolume
GetSoundSystemVolume

Pleaseeeeeeee!

My signature is NOT a moderator plaything! Stop changing it!
Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 1st Sep 2011 15:55
Quote: "The GetRawMouse commands don't seem to be working as intended."


Thanks, they are fixed for a future update.

Quote: "
GetMusicFileVolume
GetMusicSystemVolume
GetSoundSystemVolume
"


Those don't look too difficult, although at the moment we are focussing on fixing things rather than adding stuff, so not yet
Rich Dersheimer
AGK Developer
14
Years of Service
User Offline
Joined: 1st Jul 2009
Location: Inside the box
Posted: 1st Sep 2011 16:29
When typing in a text input, if the user hits the ESC key, the text input is cancelled. But, that ESC keypress is also caught in the same cycle, by GetRawKeyReleased(27).

So, if your program is trapping the ESC key (assuming you are coding for folks with an actual keyboard), the cancelling of the text input also triggers whatever code you have for catching the ESC key.

This also happens if your code traps the ENTER key, so a completed text input also throws a hit to GetRawKeyReleased(13).

Not exactly a bug, and a work-around is easy, but I think the desired behavior should be that the last keypress of a text input should NOT be picked up in the current cycle.

mr_d
DBPro Tool Maker
17
Years of Service
User Offline
Joined: 26th Mar 2007
Location: Somewhere In Australia
Posted: 1st Sep 2011 17:53
not sure what the changes to the media folder are but I think it may have caused issues.
I'm using the following:
have tried having sound.wav in both a virtual folder and a real folder, but although it seems to not give an error with the loadsound commmand, it doesn't like the playsound command and give the error:Failed to create sound instance at line xx.
the sound file plays fine in media player - any ideas?
btw,I noticed that mp3 sound file format has been dropped.

other "bugs" I've noticed so far are:
"exitfunction" does not syntax highlight properly
"global" keyword is missing from language and/or command reference
"OpenToRead" command maybe should be in the "Read" section more than the "Access" section (to match the related "Write" section command).

Mobiius
Valued Member
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 1st Sep 2011 18:00
I have a major problem!

My game has reached 1624 lines, and every time I try and add any more lines of code, (For example, If I add: Function Test() .. EndFunction)
The program crashes with an "XXX.exe has stopped working and must be closed" error.

Adding comments work, but executable code doesn't!

I'd add my code, but 1) it's 1624 lines long and 2) I don't want to make it public.

I've tried in the original version and in the new version, neither work.

HELP!!! HELP!!! HELP!!!

My signature is NOT a moderator plaything! Stop changing it!
Rich Dersheimer
AGK Developer
14
Years of Service
User Offline
Joined: 1st Jul 2009
Location: Inside the box
Posted: 1st Sep 2011 18:05 Edited at: 1st Sep 2011 18:12
Mobiius - my current project is over 2000 lines long. I started getting that same type of error when I included too many "create text", and "delete text" commands. I'm finding that if I reuse text objects, the crashes go away.

Now, I also get those kinds of crashes when I've mis-typed something, and the compiler doesn't pick up the bad code. For example, when I try to delete an object that hasn't been created. So, who knows?

DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 1st Sep 2011 19:32
Mobiius, my project is just over that size at the moment with no problems (as yet). I haven't updated my version of AppGameKit yet though and from the sounds am a little wary.
Has mp3 been dropped? If so do we have to use huge wave files now instead or is there ogg support? My game has a few mp3's in and more lined up to be used... I wouldn't mind the update for the ide F1 bug, but don't want to update it if it kills my project at this stage.

Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 1st Sep 2011 19:52
MP3 is discouraged due to various licensing restrictions that kick in if you ship over 5000 copies of a game (and Meego doesn't support MP3 at all out of the box).

The recommended format is currently M4A which has no distribution limitations, and OGG which has no restrictions at all. If you include a copy of your music in both M4A and OGG and then use LoadMusic( "myfile.mp3" ) the AppGameKit will pick the most appropriate file for the current platform.

If you're in tier 2 you can just include the right file for the platform you are compiling for.
Rich Dersheimer
AGK Developer
14
Years of Service
User Offline
Joined: 1st Jul 2009
Location: Inside the box
Posted: 1st Sep 2011 20:58 Edited at: 1st Sep 2011 21:00
Quote: "MP3 is discouraged due to various licensing restrictions that kick in if you ship over 5000 copies of a game (and Meego doesn't support MP3 at all out of the box).

The recommended format is currently M4A which has no distribution limitations, and OGG which has no restrictions at all. If you include a copy of your music in both M4A and OGG and then use LoadMusic( "myfile.mp3" ) the AppGameKit will pick the most appropriate file for the current platform.
"


Paul, what does this mean? Do we need to stop using mp3 files for our game music? I've tried LoadMusic("myfile.ogg") and LoadMusic("myfile.m4a"), both with files that I can play in winamp or quicktime. AppGameKit doesn't play any sound at all with those. And using LoadMusic("myfile.mp3") with both those files in the media folder just results in a crash with the file not found.

So, what files do we use for music?

Bursar
15
Years of Service
User Offline
Joined: 17th Sep 2008
Location:
Posted: 2nd Sep 2011 01:30
I'm perfectly happy to use ogg for everything, once it works.

I've tried to load my music in ogg format as both an ogg and mp3 file. In both cases the music doesn't play (at least I can't hear anything).

And can we have ogg support for sound effects as well please?
Mobiius
Valued Member
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 2nd Sep 2011 10:24
Quote: "I started getting that same type of error when I included too many "create text", and "delete text" commands."

But I'm not adding any more of those commands! It's when I include anything. Even adding a new, blank function it breaks. Remove that function and it compiles!

This needs to be fixed!

My signature is NOT a moderator plaything! Stop changing it!
Bursar
15
Years of Service
User Offline
Joined: 17th Sep 2008
Location:
Posted: 2nd Sep 2011 10:49
There do seem to be a lot of 'random' errors thrown up.

My code compiled fine, I then added a new source file, included it, and added a function with a single CreateText command.

Went to compile the code and it complained about an unknown parameter in a function in a different source file.

Comment out the CreateText line in the new file and the code compiles again.

some of the stuff thrown up by AppGameKit makes it incredibly difficult to track down problems. Errors are often reported on lines (or in files) that have no relation to what the problem eventually turns out to be.
Mobiius
Valued Member
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 2nd Sep 2011 11:16 Edited at: 2nd Sep 2011 11:35
I've just removed most of my create text commands.

Rather than create all text at once, I now create them only when they're on screen, and delete them when they're off screen.

Now, I get the error: "AGK Compiler has stopped working." every time I compile.

If I return to the previous way of working, (but without adding any extra functions) it works again.

This is not proving useful. I NEED this sorting out, or at least a work around provided!


**EDIT**

Now, adding anything String or Text related will crash the program.

I can create function "Test( Integer, Float )" and it works,
creating Function "Test( String, Integer, Float )" does not.
Also adding one more for/next loop in will crash the compiler. Not my game, the compiler.

Not even the DBP compiler was this bad.

My signature is NOT a moderator plaything! Stop changing it!
Rich Dersheimer
AGK Developer
14
Years of Service
User Offline
Joined: 1st Jul 2009
Location: Inside the box
Posted: 2nd Sep 2011 13:11
I feel your pain! It was doing the same thing to me. All I can tell you is that I got rid of many create/delete sprite and text commands and the crashing stopped. For AppGameKit Particle Sandbox, I was using sprites for everything, expanding a one-pixel image into many boxes, controls, text field backgrounds. And I was creating/deleting all the field labels everytime I displayed a window graphic.

The fix for me was to draw all the static text and background elements in a paint package, and stop all the sprite/text create/deletes.

Mobiius
Valued Member
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 2nd Sep 2011 14:02 Edited at: 2nd Sep 2011 14:04
The problem I'm having is that my UI code works a lot like powerpoint. Each screen contains many button objects. Each object can have text assigned to it. It only creates/deletes the text when the screen transitions in/out but still I have this issue.

I'm at a complete standstill as I cannot do any further work on my game, other than try a complete re-write to avoid it.

On the plus side, the (completely standalone, drag and drop) UI system has a working scripting engine and works perfectly! Pretty much anything you can do in powerpoint, you can do with my UI engine. (I may consider selling the code once I've resolved the crashing issue, even though the code works perfectly in a blank project.)


Which reminds me, I'd love to see the ability to compile/convert the source code into a non human readable format like LUA can do. It would make the selling of plugin like addins safer.

My signature is NOT a moderator plaything! Stop changing it!
Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 2nd Sep 2011 15:36 Edited at: 2nd Sep 2011 15:37
Quote: "AGK doesn't play any sound at all with those."


You need an OGG filter for DirectShow, such as http://www.free-codecs.com/ogg_directshow_filters_download.htm

Quote: "LoadMusic("myfile.mp3") with both those files in the media folder just results in a crash with the file not found."


You will need the latest update to use LoadMusic( "myfile.mp3" ) without mp3 files.

Quote: "Do we need to stop using mp3 files for our game music?"


You can use mp3 if you like, but be aware of the licensing issues involved http://mp3licensing.com/royalty/games.html it doesn't say anything about free games, so be careful.

I've let Lee know about the compiler issues.
Rich Dersheimer
AGK Developer
14
Years of Service
User Offline
Joined: 1st Jul 2009
Location: Inside the box
Posted: 2nd Sep 2011 15:55 Edited at: 2nd Sep 2011 16:19
Quote: "You need an OGG filter for DirectShow, such as http://www.free-codecs.com/ogg_directshow_filters_download.htm
"


Good to know. Does that mean that anyone who plays my game must have that filter on their computer? I would hate to get in that whole "you must have DirectX 9.0c" kind of situation with AGK.

Also, do you mean the next update, because I've got some music named "m.m4a" in my media folder, and LoadMusic("m.m4a") does nothing, and LoadMusic("m.mp3") throws an error, "failed to load mp3 source filter at line 144 in root".

Bursar
15
Years of Service
User Offline
Joined: 17th Sep 2008
Location:
Posted: 2nd Sep 2011 15:58
I'm guess the same also applies to M4A support. Can OGG playback not be supported from within AppGameKit so that seperate filters and plugins aren't needed?
Mobiius
Valued Member
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 2nd Sep 2011 16:13
Quote: "I've let Lee know about the compiler issues."


[big][big][big] [/big][/big][/big] lol

My signature is NOT a moderator plaything! Stop changing it!
Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 2nd Sep 2011 16:20
Mac, iOS, and Bada will all play M4A natively, Meego will play OGG natively, Windows requires the DirectShow codecs to play them.

Quote: "supported from within AppGameKit so that seperate filters and plugins aren't needed"


There are currently no plans to add OGG/M4A decoding directly in to the Windows version of AGK.
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 2nd Sep 2011 16:54 Edited at: 2nd Sep 2011 16:56
After using "message(text$)" the "GetPointerState()" command retains it's previous value on returning to the App.


EDIT: There is a workaround but in my opinion it's not ideal:


Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 2nd Sep 2011 17:19
When the mesage box opens it traps the mouse so the release notifaction goes to the message box instead of the AppGameKit window, you could try trigerring the message box on GetPointerReleased() since then the click is completed as doesn't need any more notifcations.
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 2nd Sep 2011 17:28
That's a better workaround, wasn't sure if it was intended that's all, I thought it odd that the value didn't reset since nothing was being pressed surely it should return 0 even if the mouse has been trapped elsewhere temporarily?

Is there no way to send the release notification back to the app too? ...or to flag up that focus went away from the app and reset input data such as this?

Either way it still seems like a bug to me if only a minor one.

Euphoria
18
Years of Service
User Offline
Joined: 21st Feb 2006
Location: United Kingdom
Posted: 2nd Sep 2011 18:05
Not a biggy and not sure if its already been reported (to many posts to search). The IDE won't syntax highlight the last line of code unless enter is pressed, leaving the last line of code in a file looking a little sparse in colouring....unless you have a blank line at the end of every file that is.
MikeHart
AGK Bronze Backer
20
Years of Service
User Offline
Joined: 9th Jun 2003
Location:
Posted: 3rd Sep 2011 11:54 Edited at: 3rd Sep 2011 11:55
The commands ERROR and WARNING cause AppGameKit to stop the compile process with a message like this:

Could not understand the command at line...

MikeHart
AGK Bronze Backer
20
Years of Service
User Offline
Joined: 9th Jun 2003
Location:
Posted: 3rd Sep 2011 20:07
After getting a new Fritz.Box 7390 running yesterday, my problem with my IPod AppGameKit Player detecting the broadcasting seemed to have vanished.

But I noticed one thing.

On OSX, the player can be reset into STANDBY when you click in the upper area for at least 5 seconds. On my IPod Touch 2gen running iOS 4.2.1 on it, that doesn't work at all. I always have to press the home button and then start the app again.
MikeHart
AGK Bronze Backer
20
Years of Service
User Offline
Joined: 9th Jun 2003
Location:
Posted: 3rd Sep 2011 20:27
There is an information missing in the help file:

Command: AddVirtualJoystick


Parameters:

index - The ID of the virtual joystick to create, must be in the range 1 ?????
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 3rd Sep 2011 21:11
Has anyone had any issues using the "recommended" method for animated sprites? I have used standard single images up to now which have been fine. I tried a quick test yesterday to try the single image with various animation frames method.


That should load in one image and then play the animation. Each frame is 256x256 in size, and the image is 1204x1024.
However it plays the frames all over the place and is far from correct. I do not see what I am doing wrong here.

Rich Dersheimer
AGK Developer
14
Years of Service
User Offline
Joined: 1st Jul 2009
Location: Inside the box
Posted: 3rd Sep 2011 21:50 Edited at: 3rd Sep 2011 21:53
I have had no problem with the frames, but I am manually assigning frames to the sprites. I haven't tried the "Play" command yet.

But all the frames appear correctly as I assign them, so the "make" part works for me. I'll try playing some when I get home tonight.

DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 3rd Sep 2011 22:41 Edited at: 3rd Sep 2011 22:42
I have used the image joiner utility. Which produced this image.

It looks as if the frames go down and across in order. I would have expected it to go left then down, but I assume that AppGameKit uses this order internally.

Attachments

Login to view attachments
Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 4th Sep 2011 02:37
There was a bug in the previous version with atlas textures that weren't power of 2 in size. This should be fixed with the latest version (1036), or you can work around it by making the atlas texture a power of 2.

The image joiner can place images in any order, it depends what it thinks provides the best packing method. The animation frames are read from left to right in rows. To use the image joiner to make suitable animation atlases therefore requires some hacking by first making each row as an 1024x256 atlas texture, then combining the 4 rows into the final 1024x1024 atlas texture. Might be able to make a better tool for this in future.
Rampage
16
Years of Service
User Offline
Joined: 4th Feb 2008
Location: New Zealand
Posted: 4th Sep 2011 05:09
As of v1036 none of my volume commands are working.
They all play at default volume, and no matter what I alter it to (even to 0) it doesn't make any difference.

This applies for music and sound.

Regards,

Max
LeeBamber
TGC Lead Developer
24
Years of Service
User Offline
Joined: 21st Jan 2000
Location: England
Posted: 5th Sep 2011 04:45
Hi Guys,

We have learned a lot from DBP and FPSC, and one of those lessons is that a forum thread to hold bugs can get very long and bugs can be missed very easily. For this reason, I have created a new AppGameKit bug issues board at:

http://code.google.com/p/agk/issues/list

I have started a bug (returning strings from functions via UDT) so you can see the kind of report we are looking for.

If anyone would like to transcribe any bug confirmed as reproducible from this thread to that board, we'll have the makings of a task list for the next build. Sorry if you have spent time posting here, though perhaps it gave others a chance to reproduce the bug and perhaps help with workarounds.

Thanks for the bug reports, and we look forward to ticking them off on the new Google Issues Board.

I drink tea, and in my spare time I write software.
MobileCreator
12
Years of Service
User Offline
Joined: 1st Jun 2011
Location: Ottawa - Canada
Posted: 5th Sep 2011 06:18
Hey Lee,

excellent idea! I have already used it to report something.

Is it ok to submit feature request there, too?

Also, I'd suggest to maybe lock this thread and add another note pointing to the new bug report system.

Cheers

----------
Paulo
http://www.mobilecreators.com
JRNTexas
12
Years of Service
User Offline
Joined: 24th May 2011
Location: Austin, Texas
Posted: 5th Sep 2011 13:02
Array Bug - I declare an array and then two multidimensional arrays then open a file and read the first array, then two multidimensional arrays all from a sequential file.

So when I read the file, I read a in a string that belongs to the first array. Then I read in a number that is an element in the first multidimensional array, then I read in a number that is an element in the second multidimensional array, all from the same file.

If I print out all of the information in a for next loop:


I can see all of the elements in all arrays are present.

However I cannot access one element in either of the multidimensional arrays individually.

If I leave out or remark out the print(a$[h]):


Then all I get is zeros for the x[h,h1] and the y[h,h1].

and if I try to use any of the elements of either of the two multidimensional arrays individually I get a zero as in:

SetSpritePosition( 1, x[h,h1], y[h,h1]. The sprite ends up in the 0,0 position on the screen, always for every element of each of the arrays.

Unless I refer to the string in the standard array, in order, the multidimensional arrays have no return value.

Here is the data in my file, "pos.dat":



Here is some sample code that demonstrates the problem:



Notice that the "print(level$[h])" line is remmed out.
When your run the code with this line remmed out, the print statements return all zeros.

If you delete the "rem" on the front of the line, you get the values for each element of the arrays.

I have also attached the "pos.dat" file

I store the data as strings in the file. This way I can easily read and write the data with "notepad".

I then read in each value and convert it from a string to a value then assign it to an element of the array. I've done this a lot in DBPro and other development environments so this should not be causing the problem.

I've tried several things to work around the problem with no success. I tried taking the string out of the file "level1", etc. and I've tried separating the two sets of array data into separate files. None of this works. When I try to get the info from the array, it holds nothing.

Attachments

Login to view attachments
JRNTexas
12
Years of Service
User Offline
Joined: 24th May 2011
Location: Austin, Texas
Posted: 5th Sep 2011 13:05
I've found a slight error in the documentation.

In the docs for OpenToRead it states:

OpenToRead( ID, szFile )

integer OpenToRead( szFile )

are two methods for opening a file.

However, in Open to write, it only shows one of the methods:

integer OpenToWrite( szFile, append )

However both methods also work with OpenToWrite.
Rich Dersheimer
AGK Developer
14
Years of Service
User Offline
Joined: 1st Jul 2009
Location: Inside the box
Posted: 5th Sep 2011 13:48 Edited at: 5th Sep 2011 13:50
JRNTexas - see the post two above yours to find out where to report bugs from now on.

And, hey mods - maybe lock this so we have to post bugs in the new location?

Login to post a reply

Server time is: 2024-04-30 13:53:07
Your offset time is: 2024-04-30 13:53:07