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 / String Functions and General Documentation

Author
Message
jomajuga
12
Years of Service
User Offline
Joined: 7th Sep 2011
Location:
Posted: 1st Dec 2011 23:24
Hi

1-) I am working on a PC/MAC text-based Tier 1 game WITH NO USE of the StartTextInput method built in AGK. Now I found a dead end trying to handle the use of Backspace. Whereas I can detect each and every key stroke I can't find a function that allows me delete the last character of the string I'm building. Looking on the web the Visual Basic docs suggest the Remove() function... which doesnt work on AppGameKit Tier 1.

Does anyone know of a way, any function or something I can use for string manipulation?

2-) Trying to solve the problem above I looked over and over at the documentation provided with AppGameKit and could not find any clues about. This made me think of how poor this docs are regarding the very BASIC programming language used to code Tier 1 AppGameKit games.

Dows anyone know of a place or doc I can look for regarding AGK-Compatible BASIC language?

Thanks for your patience and help.
Marl
12
Years of Service
User Offline
Joined: 19th Nov 2011
Location: Bradford, UK
Posted: 2nd Dec 2011 15:49
I'm not sure if this is what you're asking for, but if you're handling the inputs yourself and manipulating a string in code you could use the left () function;

a$ = left ( a$ , len ( a$ ) -1 )

This will remove the last character of the string a$

len ( ) returns the length of the string
left ( ) returns the leftmost characters

In "traditional" basic ( including dark basic ) functions that return a string have a $ on the function name so the AppGameKit left() function would be called left$() elsewhere.
Stormwire
13
Years of Service
User Offline
Joined: 3rd Sep 2010
Location:
Posted: 6th Feb 2012 02:50
@Marl You just saved me a headache Thanks!

Login to post a reply

Server time is: 2024-05-06 03:41:41
Your offset time is: 2024-05-06 03:41:41