Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (Akow, TipmyPip, tomaslolo), 788 guests, and 11 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19055 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Problems with execute() on setting var? #266126
05/16/09 05:43
05/16/09 05:43
Joined: Aug 2002
Posts: 681
Massachusetts, USA
Ichiro Offline OP
User
Ichiro  Offline OP
User

Joined: Aug 2002
Posts: 681
Massachusetts, USA
Hi. I posted about execute() here (http://www.opserver.de/ubb7/ubbthreads.php?ubb=showflat&Number=265888#Post265888), but did not get any takers. I receive an alert box with an error message when I do this:

> execute("temp=5;");

...but not this...

> execute("temp+=1;");

Am I missing something?

Thank you.


Dejobaan Games - Bringing you quality video games for over 75 years.
Re: Problems with execute() on setting var? [Re: Ichiro] #266281
05/17/09 09:31
05/17/09 09:31
Joined: Sep 2003
Posts: 929
Spirit Offline

Moderator
Spirit  Offline

Moderator

Joined: Sep 2003
Posts: 929
Both works here.

function main()
{
execute("temp=1;");
execute("temp+=1;");
}

But "temp" is not defined in lite-C, only in WDL, maybe you were using lite-C instead of WDL?

Re: Problems with execute() on setting var? [Re: Spirit] #266450
05/18/09 05:19
05/18/09 05:19
Joined: Aug 2002
Posts: 681
Massachusetts, USA
Ichiro Offline OP
User
Ichiro  Offline OP
User

Joined: Aug 2002
Posts: 681
Massachusetts, USA
Yeah; I'd originally posted in the C-Script forum, which I now realize I didn't explicitly mention here(!). If it helps, I'm calling this from the console when it complains.


Dejobaan Games - Bringing you quality video games for over 75 years.
Re: Problems with execute() on setting var? [Re: Ichiro] #266454
05/18/09 06:21
05/18/09 06:21
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
Under lite-C, the console does not call execute() but var_for_name. var_for_name can assign a value (=), but can not add a value (+=).

Re: Problems with execute() on setting var? [Re: jcl] #266525
05/18/09 15:44
05/18/09 15:44
Joined: Aug 2002
Posts: 681
Massachusetts, USA
Ichiro Offline OP
User
Ichiro  Offline OP
User

Joined: Aug 2002
Posts: 681
Massachusetts, USA
Yup. But I'm typing this from the console, and running .WDLs:

> execute("temp=5;");



Thanks.


Dejobaan Games - Bringing you quality video games for over 75 years.
Re: Problems with execute() on setting var? [Re: Ichiro] #266526
05/18/09 15:48
05/18/09 15:48
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
Ah, now I understand what you did.. You found an endless recursion. "execute()" is certainly not a good parameter for execute(). This is almost a Turing bug.

I'll mention in the manual that one must not type "execute" in the console.

Re: Problems with execute() on setting var? [Re: jcl] #266554
05/18/09 16:52
05/18/09 16:52
Joined: Aug 2002
Posts: 681
Massachusetts, USA
Ichiro Offline OP
User
Ichiro  Offline OP
User

Joined: Aug 2002
Posts: 681
Massachusetts, USA
Aha. Thanks!


Dejobaan Games - Bringing you quality video games for over 75 years.

Moderated by  old_bill, Tobias 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1