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 / AGK -> AGK2 converting : compiler error & no virutal folders?

Author
Message
Raizzan
9
Years of Service
User Offline
Joined: 28th Jan 2015
Location:
Posted: 28th Jan 2015 20:37
hi again

so now ive downloaded agk2, converted my game and now ive encountered 2 different problems

first problem:



i get a compiler error which says
"variable declaration must start with a variable name"
soo..
the syntax is different now... i guess.
how can if fix this? :-((

second problem:

ive already searched and couldnt find...
how can i create virtual folders?

thanks again
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 28th Jan 2015 22:08 Edited at: 28th Jan 2015 22:10
Within a type, you don't use the global prefix. The variable you create from the type can be global though.




for your second question, are you talking about MakeFolder()?

Quidquid latine dictum sit, altum sonatur
Raizzan
9
Years of Service
User Offline
Joined: 28th Jan 2015
Location:
Posted: 28th Jan 2015 22:30
im talking about



those folders.


how can i create them in agk2?
Raizzan
9
Years of Service
User Offline
Joined: 28th Jan 2015
Location:
Posted: 28th Jan 2015 23:23
"global MyInput as inputtype"
works
but

still my converted project doesnt work.
how to make a variable inside a type inside a type global?

baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 29th Jan 2015 09:02
You shouldn't need to do anything, if the 'Player' UDT is set as global then all the data within that data object should also be global.

We don't set type's or sub-type's as global as they are a data structure, not variables.

Can you write a simple example that can be compiled and run to demonstrate this issue?


Using AppGameKit V2 Tier 1
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 29th Jan 2015 09:48
I have created 3 arrays using 3 different types of syntax. The third one is your syntax, although you don't need to use Global when you use Dim. All 3 of them are working OK...



Quidquid latine dictum sit, altum sonatur
Raizzan
9
Years of Service
User Offline
Joined: 28th Jan 2015
Location:
Posted: 29th Jan 2015 23:42
turns out everything works well with globals and types but there was a problem
with the if-statements.
"
if (variable1 && variable2 = 0)

is not the same as:

if (variable1 = 1 && variable 2 = 0)

anymore.(as it as in agk1)
"
still , virtual folders would give me a bit more overview than all codes in 1 main folder

is there any solution for that?
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 30th Jan 2015 10:15
The new IDE is made with Geany and I can't see any virtual folder feature on their website.

Quidquid latine dictum sit, altum sonatur
Raizzan
9
Years of Service
User Offline
Joined: 28th Jan 2015
Location:
Posted: 30th Jan 2015 14:37
bye bye overview







its such a shame

Login to post a reply

Server time is: 2024-11-21 12:39:32
Your offset time is: 2024-11-21 12:39:32