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 / UCF text() issue on V1.08B8

Author
Message
Talairina
18
Years of Service
User Offline
Joined: 9th Jan 2006
Location: United Kingdom
Posted: 8th Feb 2013 12:38
Anyone else noticed that the UCF function 'Text( X#, Y#, txt$ )' has stopped working with v1.08B8? It worked fine on the trial/demo version of AppGameKit but I've just purchased AppGameKit and compiled my code and none of the text created and maintained by that function will display.

There is no error's and from what I can see, no issues which mean's I'm missing something, somewhere. Can someone more experienced with AppGameKit take a look to see if something has changed from the Demo (Not sure what version that is) and v1.08B8.

I really liked this function as it worked the same way as DBP text() did which is what I'm used to.

Here's some code to test.

Hodgey
15
Years of Service
User Offline
Joined: 10th Oct 2009
Location: Australia
Posted: 8th Feb 2013 13:00
Wow! It's been a long time since I wrote those functions. I completely forgot about them!

The declarations don't look legit. Try moving the assignments to a new line. Basically:



That works in 1076.

What exactly is wrong? Does it not show up or does the app crash?

Talairina
18
Years of Service
User Offline
Joined: 9th Jan 2006
Location: United Kingdom
Posted: 8th Feb 2013 13:39
It was simply not displaying the text. However your new declarations above seem to fix the issue. Is there a reason why it does not throw up an error on the old ones compared to the new ones? I see you've moved the settings down a line off the declaration. That seem's to of been the issue. Work's on 1088 now with that change.

I love those function's Hodgey. Help's and old DBP programmer make the transition. I even found a few of my old one's in UCF too. Pity's it's not been updated in awhile. Very helpful functions in there.
Mobiius
Valued Member
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 8th Feb 2013 18:50
Why use arrays in the declarations? Surely the following is easier to read?



Also, when declaring variables, they are automatically initialised as 0, or 0.0. AppGameKit is forgiving, whilst other languages may not be.

I live for video games! (And beers, and football, and cars!)
See what I live for here: [url]http:\\www.TeamDefiant.co.uk[/url]
Hodgey
15
Years of Service
User Offline
Joined: 10th Oct 2009
Location: Australia
Posted: 8th Feb 2013 21:51
Quote: "Is there a reason why it does not throw up an error on the old ones compared to the new ones?"

Maybe they are syntactically correct but the initialisation may not have worked.

Quote: "Why use arrays in the declarations? Surely the following is easier to read?"

It may have been written at a time when declaring globals in arrays (in source files to be included) didn't work. A bunch of functions use those arrays to I'm not tempted to change them.

Quote: "Also, when declaring variables, they are automatically initialised as 0, or 0.0. "

I don't rely on this (or single line declarations and initialisations) in the betas because I found out that the initialisation part wasn't taking place and instead they got random values. It may have been fixed by now but once you've been bitten, it's hard not to be cautious.

Daniel TGC
Retired Moderator
17
Years of Service
User Offline
Joined: 19th Feb 2007
Location: TGC
Posted: 9th Feb 2013 14:31
If memory serves this was created when 1.065 was still the major release. Things have improved since then and proper globals can be used across source code files. I'll have to go through all these at some point and bring them up to date.

Login to post a reply

Server time is: 2024-11-24 09:09:16
Your offset time is: 2024-11-24 09:09:16