Gamestudio Links
Zorro Links
Newest Posts
webGL
by Ice2642. 11/17/25 21:27
Camera always moves upwards?
by NeoDumont. 11/17/25 09:56
Future of ZorroHFT
by TipmyPip. 11/16/25 13:52
COT Download with Quandl does not work
by Petra. 11/15/25 09:35
Training with the R bridge does not work
by Petra. 11/15/25 09:31
Zorro 2.70
by jcl. 11/15/25 08:43
brokerCommand PLOT_HLINE parameters
by M_D. 11/13/25 10:42
ZorroGPT
by TipmyPip. 11/10/25 11:04
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
3 registered members (AndrewAMD, SkinnyApe, 1 invisible), 7,580 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
SkinnyApe, tritom, sheliepaley, Blueguy, blobplayintennis
19179 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Function Parameter: undeclared identifier? #371993
05/27/11 02:40
05/27/11 02:40
Joined: Apr 2007
Posts: 125
Brazil - São Paulo
Ericmor Offline OP
Member
Ericmor  Offline OP
Member

Joined: Apr 2007
Posts: 125
Brazil - São Paulo
Hi folks,
As i´m translating a large C-script code into Lite-C, i came into a weird error regarding function parameters.
The following code gives a '"G" undeclared identifier' error:
Code:
function PORTRAIT_DIALOG(var* G,var* B)
{
 if(G==0)
 {
  LUCY_CONTROL(22);
  PLAYER_CONTROLface(22);
  UNKNOWCONTROLface(B);
  return;
  }
...


It´s weird bacuse i have other functions with even more parameters... what´s wrong? Changing 'G' to lowercase or other name doesn´t do a thing, should i declare those variables somewhere else?
By the way: the function by itself (i placed it inside one of the Lite-C examples) works fine and give no errors... why?
No variables of any kind uses 'G' (and renaming it simply doesn´t work).
Any help is appreciated... thanks in advance.

Re: Function Parameter: undeclared identifier? [Re: Ericmor] #371994
05/27/11 05:24
05/27/11 05:24
Joined: Apr 2007
Posts: 125
Brazil - São Paulo
Ericmor Offline OP
Member
Ericmor  Offline OP
Member

Joined: Apr 2007
Posts: 125
Brazil - São Paulo
OK, this was an engine error, if i ever saw one.
The top function had one less bracket, and the engine didn´t complain at all about a FUNCTION inside a function...
When i placed the bracket, the error changed... meaning that "G" was now recognized as a var.
What gives? I can now have FUNCTIONS inside other functions!?? The error should have been the word ´FUNCTION´ inside the function itself... is that allowed in Lite-C?

Re: Function Parameter: undeclared identifier? [Re: Ericmor] #372001
05/27/11 06:21
05/27/11 06:21
Joined: Oct 2007
Posts: 5,211
İstanbul, Turkey
Quad Offline
Senior Expert
Quad  Offline
Senior Expert

Joined: Oct 2007
Posts: 5,211
İstanbul, Turkey
no it's not, function is only a define for fixed. It's lik same thing as having an int inside a function.


3333333333

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

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