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
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (Miska), 755 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
lorikob361, LucasJoshua, Baklazhan, Hanky27, firatv
19054 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
A773 Syntax errors. #256784
03/19/09 00:10
03/19/09 00:10
Joined: Oct 2003
Posts: 130
Wollongong Australia
J
Jethro Offline OP
Member
Jethro  Offline OP
Member
J

Joined: Oct 2003
Posts: 130
Wollongong Australia
I just installed A7.73 Pro and tried our existing project (.wdl) that run in A770 and it now has startup errors.

It keeps telling me that 2 global arrays I defined, only 3 vars wide is now read only, when I try to assign something to it.
See following code, the 2 variables it thinks are read only are.

Var 3dB_temp[3];
Var 3dB_temp2[3];


Code:
Var 3dB_temp[3]; 
Var 3dB_temp2[3]; 

ACTION 3D_BAR{
//Save our initial positions
Fuel_Cell_Dest[0]=0; //Turn our fuel cell destination off.

MY.unlit=on;
my.ambient=100;
//my.transparent=on;
my.bright=on;
//my.lightrange=150;
//my.red=250;
//my.green=250;
My.Skill21=MY.X;
My.Skill22=MY.Y;
My.Skill23=MY.Z;
My.Skill24=MY.Pan;
My.Skill25=MY.Tilt;
My.Skill26=MY.Roll;
MY.Scale_Z+=.1; //Just to fill bottom when full.

While (Fuel_Cell_Dest[0]==0){ // until instructed to enter the jet
  //Correct our item amount if its out of limits
  3dB_temp=get_item_data(my.Skill1);
  3dB_Temp=max(My.Skill2,(min(3db_Temp,My.Skill3))); // limits a to values between skill2 and skill3

  Jed_Vec_Set(JMT_Max_Spd.X,3,3,3);
  Jed_Vec_Set(JMT_Min_Spd.X,1,1,1);
  
  3db_Temp2.X=My.Skill21+3db_temp*My.Skill4;
  3db_Temp2.y=My.Skill22+3db_temp*My.Skill5;
  3db_Temp2.z=My.Skill23+3db_temp*My.Skill6;
  
  Jed_Move_To (MY.X,3db_Temp2.X);

  3db_Temp2.X=My.Skill24+3db_temp*My.Skill7;
  3db_Temp2.y=My.Skill25+3db_temp*My.Skill8;
  3db_Temp2.z=My.Skill26+3db_temp*My.Skill9;

  Jed_Move_To (MY.PAN,3db_Temp2.X);

  wait(1);
  }
  MY.Transparent=on;
  My.Alpha=100;
//snd_Play( Fill_Tank_SND,100,0); //This could depend on dest_type

While (Me!=NULL) {//Move to the fuel cell.
  IF (MY.Scale_Z>.01+.05*Time){
    MY.Scale_Z-=.04*Time;
    }ELSE{
    MY.Invisible=on;
    }
  My.Alpha-=3*Time;
  IF (MY.Alpha<=0) {MY.Invisible=on;}
  wait(1);
  }
  
  
}



The error is Read only 3dB_temp
and Read only 3dB_temp2.x

Thats not all, if I comment out all of the above code, it moves on to another randomly chosed var that I have defined globally and says its read only.
Also it say an entity.x is no longer a vector, by giving a vector expected error for following line.

Vec_Set(3D_Curs_ent.X,MY.X);
Syntax error vector expected.

This is a huge project with many includes, it has been published with A7.50, and it ran on A7.70

Jethro.

Re: A773 Syntax errors. [Re: Jethro] #256786
03/19/09 01:25
03/19/09 01:25
Joined: Oct 2007
Posts: 5,210
İstanbul, Turkey
Quad Offline
Senior Expert
Quad  Offline
Senior Expert

Joined: Oct 2007
Posts: 5,210
İstanbul, Turkey
you cant use variable names staring with numbers???


3333333333
Re: A773 Syntax errors. [Re: Quad] #256792
03/19/09 03:45
03/19/09 03:45
Joined: Oct 2003
Posts: 130
Wollongong Australia
J
Jethro Offline OP
Member
Jethro  Offline OP
Member
J

Joined: Oct 2003
Posts: 130
Wollongong Australia
You could when using c-script .wdl language in A770 down to A3, but now you mention it all of my errors are with variables starting with numbers.

I used the new -eq feature to output all the errors and I now have 1248 lines of error messages.

I guess its not backward compatible to A6 like they say.

I'm guessing the code parser is in Lite-C mode all the time now.
It needs fixing if any of us older users are to upgrade.

Jethro.

Last edited by Jethro; 03/19/09 03:57.
Re: A773 Syntax errors. [Re: Jethro] #256828
03/19/09 09:05
03/19/09 09:05
Joined: Aug 2000
Posts: 1,140
Baunatal, Germany
Tobias Offline

Moderator
Tobias  Offline

Moderator

Joined: Aug 2000
Posts: 1,140
Baunatal, Germany
Cscript did never allow variable names starting with numbers. Not in A6 and not in A5 A4 or A3.

Re: A773 Syntax errors. [Re: Tobias] #256835
03/19/09 09:38
03/19/09 09:38
Joined: Oct 2003
Posts: 130
Wollongong Australia
J
Jethro Offline OP
Member
Jethro  Offline OP
Member
J

Joined: Oct 2003
Posts: 130
Wollongong Australia
Well I'm guessing it was an undocumented feature, because I have over a dozen games published with variables starting with numbers in their code. Try it with A7.70 no problem it works.
Definately Lite-C it is forbidden.

Re: A773 Syntax errors. [Re: Jethro] #256860
03/19/09 11:44
03/19/09 11:44
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
That's correct. Newer engines always detect more errors than older engines. That's not a bug, it's a feature smile.

Re: A773 Syntax errors. [Re: jcl] #257009
03/20/09 00:30
03/20/09 00:30
Joined: Oct 2003
Posts: 130
Wollongong Australia
J
Jethro Offline OP
Member
Jethro  Offline OP
Member
J

Joined: Oct 2003
Posts: 130
Wollongong Australia
Ok. It would be nice to be warned in the upgrade notes to save us all wasting time here.

eg. "The old undocumented feature of allowing variables to start with a number in c-script has been removed."

I'll fix my code.

Re: A773 Syntax errors. [Re: Jethro] #257041
03/20/09 07:51
03/20/09 07:51
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
We don't intentionally remove the "feature" to accept a certain syntax error. But this can be a consequence of improving code at another place. Such things are mentioned in the update installation instructions. The engine is compatible to past features, but not to past syntax errors.

Messages about syntax or other errors that weren't detected before are quite normal after an update, especially in C-Script. The are less frequent in lite-C which has a much more thorough syntax checker.


Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

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