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 / Can you evaluate commands that have been constructed as strings?

Author
Message
Scifictus
9
Years of Service
User Offline
Joined: 7th Feb 2015
Location:
Posted: 22nd Feb 2015 17:51
Hi All

I think the answer is no to this one but thought I would check before giving up hope...

Let's say I have the following code:

Dim johnsmith[3]
johnsmith[2] = 12345
a$ = "john"
b$ = "smith"
c$ = a$ + b$ + "[" + "2" + "]"

In the above example c$ would now contain "johnsmith[2]"

Is there anyway I can force AppGameKit to evaluate that string as a command at run time? In other words, make my code return the value of the array johnsmith[2] (which would be 12345) by using the c$ variable? I havent found a way of making this work?
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 22nd Feb 2015 18:12
No, it's not possible.
You could do it with something like Lua, but AppGameKit doesn't have Lua scripting functionality like GameGuru (FPSCR).

Quidquid latine dictum sit, altum sonatur
Scifictus
9
Years of Service
User Offline
Joined: 7th Feb 2015
Location:
Posted: 22nd Feb 2015 20:26
OK - thanks for confirming.

Login to post a reply

Server time is: 2024-05-24 19:44:19
Your offset time is: 2024-05-24 19:44:19