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.

Author
Message
Increase
7
Years of Service
User Offline
Joined: 21st Feb 2017
Location:
Posted: 6th Sep 2018 14:50
Is it me not knowing a hidden syntax, or is #Insert just usable with a constant.

#Insert "xxx" works
while #Insert a$ doensn't ;

#Insert filename$ is documented though


Cliff Mellangard 3DEGS
Developer
18
Years of Service
User Offline
Joined: 20th Feb 2006
Location: Sweden
Posted: 6th Sep 2018 16:57
#Insert filename$ is documented though

Is only explaining that it nead a file name actually...
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 6th Sep 2018 19:49
#insert is a compiler instruction.
So variables mean nothing at this point.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt
Increase
7
Years of Service
User Offline
Joined: 21st Feb 2017
Location:
Posted: 6th Sep 2018 22:07
ok, so just a language weakness
puzzler2018
User Banned
Posted: 6th Sep 2018 22:26
There is absolutely no weakness in AppGameKit capabilities - maybe your using AppGameKit for other reasons to the rest of us
basicFanatic
7
Years of Service
User Offline
Joined: 7th Jun 2017
Location:
Posted: 6th Sep 2018 23:51
This is the BASIC language. So Ideally, we shouldn't be required to understand the compiling process. But I guess there's some behind-the-hood stuff that goes against the beginner-friendly foundation.


Another little quirk that repeatedly gets me is when I want to create a light and type something like this:

PointylightyThing = CreatePointLight( 0.0, 0.0, 0.0, 5.0, 220, 220, 220 )

But for some reason, the light only accepts this:

CreatePointLight(PointylightyThing, 0.0, 0.0, 0.0, 5.0, 220, 220, 220 )



IronManhood
9
Years of Service
User Offline
Joined: 6th Feb 2015
Location: US
Posted: 8th Sep 2018 22:18
Quote: "Another little quirk that repeatedly gets me is when I want to create a light and type something like this:

PointylightyThing = CreatePointLight( 0.0, 0.0, 0.0, 5.0, 220, 220, 220 )

But for some reason, the light only accepts this:

CreatePointLight(PointylightyThing, 0.0, 0.0, 0.0, 5.0, 220, 220, 220 ) "


Looks like somebody forgot to overload that one.
Bengismo
7
Years of Service
User Offline
Joined: 20th Nov 2017
Location: Yorkshire, England
Posted: 9th Sep 2018 00:55
IronManhood wrote: "Looks like somebody forgot to overload that one."


Looking at the Teir 2 code, I (or anyone else with C++ knowledge) could easily add the alternate version which assigns an id point light instead if its really wanted? I try not to use more than a handful of point lights in pixel mode anyway. A custom shader is really the best method.

All the commands with # before them are preprocess commands meaning variables are not assigned at that point so everything has to be a literal value. Same as c compilers etc....
basicFanatic
7
Years of Service
User Offline
Joined: 7th Jun 2017
Location:
Posted: 9th Sep 2018 11:52
Bengismo wrote: "All the commands with # before them are preprocess commands meaning variables are not assigned at that point so everything has to be a literal value. Same as c compilers etc...."


Thanks, good to know! I had wondered about the weird hashtag before constants. I figured it meant "this stuff is an integer", except that hashtag is for real numbers, so ...
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 10th Sep 2018 11:25
the #include we had put everything at the end of main file, that was not good for the compiler to understand.
the #Insert place the file data exact there, its better if u have dims and types at top at other modules.
AGK (Steam) V2018.08.30 : Windows 10 Pro 64 Bit : NVIDIA (397.31) GeForce GTX 1050 Ti : Mac mini OS High Sierra (10.13)
basicFanatic
7
Years of Service
User Offline
Joined: 7th Jun 2017
Location:
Posted: 10th Sep 2018 12:20
I prefer to #include the file, and use a gosub to get some stuff done right away:

#include "_ai.agc"
gosub _ai

This allows me to add some functions after the gosub. Those will conveniently be placed at the end of the main file.

Login to post a reply

Server time is: 2024-11-23 15:29:16
Your offset time is: 2024-11-23 15:29:16