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 / 1 bit of code, yet 3 different results when ran (in run, debug and broadcast)

Author
Message
bigc90210
9
Years of Service
User Offline
Joined: 12th Jan 2015
Location:
Posted: 30th Jun 2015 23:06
Heres' a snippet of code im running:
--------------------------------------------------------------------
SetFolder("deckFighters")
fn$ = getfirstfolder()

d = 0

dim Deck_Listings[-1] as string

//Build Deck List
while fn$ <> ""
Deck_Listings.Insert(fn$)
//Next Deck
fn$ = GetNextFolder()
If fn$ <> ""
d = d + 1
EndIf
endwhile

//Show Deck List
for dc = 0 to (d - 1)
print(Deck_Listings[dc])
imgCover = 4000 + dc
loadimage( imgcover, Deck_Listings[dc] + "\deckcover.png" )
sprCover = 4100 + dc
createSprite( sprCover, imgCover )

SetSpritePosition( sprCover, 100 + (300 * (dc + 1) ), 200 )
next

sync( )
sleep( 2000 )

--------------------------------

What it is doing, is looking in the folder "deckfighters", finding any subfolders, and for each folder, getting the deckcover image file, and displaying them.

I have 2 subfolders, A and B, both with deckcover images in them.

Now, when i run this in "Run" mode, only cover A is loaded onto the screen. if i broadcast it to my android device, only cover B is loaded onto the screen. Now if i run it in debug mode, Both cover A and Cover B are loaded side by side (this is what im trying to achieve).

Can anyone see why this is not loading as expected on run and broadcast, and/or why these are all loading differently?
PartTimeCoder
AGK Tool Maker
9
Years of Service
User Offline
Joined: 9th Mar 2015
Location: London UK
Posted: 1st Jul 2015 19:18
replace your backslash with a forward slash in your filepath, maybe?, only obvious thing I can see!
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 1st Jul 2015 20:32
the solution


AGK 108 (B)19 + AppGameKit (Steam) V2 Beta .. : Windows 8.1 Pro 64 Bit : AMD Radeon R7 265 : Mac mini OS X 10.10 (Yosemite)
bigc90210
9
Years of Service
User Offline
Joined: 12th Jan 2015
Location:
Posted: 2nd Jul 2015 01:52
still getting some strange behaviours :/

There USED to be a folder called C in the same loctaion as where A and B are, but it is 100% no longer there.

As before, when i run this using "Run" i get cover image A, when i broadcast i get cover image b, and when i debug i get cover image A and B as intended, and a broken image which when i put it in the variable debugger seems to be pointing to the old folder C, which no longer exists. is this caching folders somewhere or something?

Still dont understand how this is only displaying 1 folder image running normally though :/

Cheers
bigc90210
9
Years of Service
User Offline
Joined: 12th Jan 2015
Location:
Posted: 2nd Jul 2015 14:16
to elaborate on my previous post, despite there definitely being only folders A and B, the do-loop is looping 3 times and picking up folder C even though it isnt there anymore (hence my question about caching), whereas i'd only expect it to loop through twice and pick up A and B
PartTimeCoder
AGK Tool Maker
9
Years of Service
User Offline
Joined: 9th Mar 2015
Location: London UK
Posted: 2nd Jul 2015 17:28 Edited at: 2nd Jul 2015 17:30
if fn$="" then << should be "=="

or am I working with to many languages!
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 2nd Jul 2015 20:39 Edited at: 2nd Jul 2015 21:20
it sounds really there are cached or temporary files/folders.
you found something in documents or appdata folder?
maybe start a new project and see what happens there.

AGK 108 (B)19 + AppGameKit (Steam) V2 Beta .. : Windows 8.1 Pro 64 Bit : AMD Radeon R7 265 : Mac mini OS X 10.10 (Yosemite)
bigc90210
9
Years of Service
User Offline
Joined: 12th Jan 2015
Location:
Posted: 3rd Jul 2015 11:18 Edited at: 3rd Jul 2015 11:20
Quote: "if fn$="" then << should be "=="

or am I working with to many languages!"


Although I know what you mean with regarding == instead of = (as this is what it would be in PHP and a bunch of other languages) a single = works in AppGameKit? I dont think i've seen anything in the documentation about using double =='s at all

Quote: "it sounds really there are cached or temporary files/folders.
you found something in documents or appdata folder?
maybe start a new project and see what happens there."


In the Appdata folder there is no "C" folder so im lost with this!

spent most of last night trying to work this out to no avail, still getting 3 folders in debug mode, A in normal and B in broadcast where I should only be getting A and B haha!
bigc90210
9
Years of Service
User Offline
Joined: 12th Jan 2015
Location:
Posted: 13th Jul 2015 22:06
hey just an update on this, I copied and pasted my whole project into a different folder, then re-ran it and this issue has stopped (ive made absolutely no code changes)

on the back of this, I would say this is down to some sort of AppGameKit caching issue
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 14th Jul 2015 09:23
hmm, i agree, but where in the system?

AGK 108 (B)19 + AppGameKit (Steam) V2 Beta .. : Windows 8.1 Pro 64 Bit : AMD Radeon R7 265 : Mac mini OS X 10.10 (Yosemite)

Login to post a reply

Server time is: 2024-11-16 18:15:53
Your offset time is: 2024-11-16 18:15:53