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.

Newcomers AppGameKit Corner / [SOLVED] code not working in function only in loop?

Author
Message
dandrews
3
Years of Service
User Offline
Joined: 26th Jun 2020
Location:
Posted: 17th Jul 2020 05:23
This post has been marked by the post author as the answer.
im very confused as this code works when in my do loop directly but when i put it in a function in the loop it seems to run through the code once. i print the "explotime that is supposed to increase to 200 but it stays at one so i know its passing throuhg at least once

The author of this post has marked a post as an answer.

Go to answer

Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 17th Jul 2020 05:35 Edited at: 17th Jul 2020 05:41
Quote: "global esplotime as integer"

i stopped looking after i saw that.
[My Itch.io Home]
[CODE lang=AGK] Your Code Here [/CODE]
[VIDEO=youtube] VideoID [/VIDEO]
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 17th Jul 2020 06:03
if you add #option_explicit to your app it will force you to define variables which should help you to avoid problems
dandrews
3
Years of Service
User Offline
Joined: 26th Jun 2020
Location:
Posted: 17th Jul 2020 12:51
Wow this is embarrassing.... Lol thank you both . Blink is there some examples of option explicit being used?
Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 17th Jul 2020 16:02 Edited at: 17th Jul 2020 16:03
we've all done it. and, for some of us, way more than once

Quote: "is there some example?"


run that. then, un-REM the first line at run it again.
[My Itch.io Home]
[CODE lang=AGK] Your Code Here [/CODE]
[VIDEO=youtube] VideoID [/VIDEO]
dandrews
3
Years of Service
User Offline
Joined: 26th Jun 2020
Location:
Posted: 17th Jul 2020 17:51
thats great! thank you

Login to post a reply

Server time is: 2024-04-24 18:57:27
Your offset time is: 2024-04-24 18:57:27