Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
1 registered members (TipmyPip), 18,388 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 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: 28,024
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,024
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: 28,024
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,024
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 | 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