Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 1,097 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
'content' undeclared identifier #369863
05/08/11 07:33
05/08/11 07:33
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;
I´m translating a large old .wdl code into Lite-C, but i´ve runned into a problem.
An action code used by the collision detection camera entity apparently doesn´t work in Lite-C - couldn´t find any working example of the new code, since i don´t know what the new syntax is.
This is the old code:
Code:
...
if(camera_mode==1)
      {
      vec_set (my.x,camera_1.x); 
      result = content(my.x);
      if (result == content_solid){camerainblock=1;}
      else{camerainblock=0;}
      }wait(1);
...


It gives the following error:

Error in ´actions.c´ line 113:
´content´ undeclared identifier
< result=content(my,x);
>

"content" was the .wdl syntax for determining content of an object... how is it handled in Lite-C?
Maybe now it´s some PhysiX code probably, but i´d like to first put this one to run again first, to optimize the code with a running version of the game.
Any help is appreciated... thanks in advance.

Re: 'content' undeclared identifier [Re: Ericmor] #369864
05/08/11 07:53
05/08/11 07:53
Joined: Nov 2007
Posts: 1,143
United Kingdom
DJBMASTER Offline
Serious User
DJBMASTER  Offline
Serious User

Joined: Nov 2007
Posts: 1,143
United Kingdom
I think you're looking for the 'c_content' function. Check the manual on how its syntax differs laugh.

Last edited by DJBMASTER; 05/08/11 07:53.
Re: 'content' undeclared identifier [Re: DJBMASTER] #369992
05/10/11 12:11
05/10/11 12:11
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
Thanks DJBMaster!
Also, content result now is expressed in NUMBERS (1,2 or 3), not in "content_solid", etc, as it was in the past.

Re: 'content' undeclared identifier [Re: Ericmor] #370017
05/10/11 14:48
05/10/11 14:48
Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
Rei_Ayanami Offline
Expert
Rei_Ayanami  Offline
Expert

Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
Please check the manual!

The last questions you asked could have been avoided...

However, you can still check the defines, but liteC is Case-Sensetive -> CONTENT_SOLID etc

Re: 'content' undeclared identifier [Re: Rei_Ayanami] #370069
05/10/11 20:05
05/10/11 20:05
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
You´re right. Maybe they could, searching for hours for each syntax.
But most searches with the syntax error return bogus content, that´s whay this forum exists.
Usually, you must ALREADY KNOW the answer to be able to search for the right syntax, wich is a serious error in the manual.
I refrain from using the forum without doing a time-consuming search, wich will be huge because i´m translating 20.000 lines of code, from a large project. That´s not the last time i´ll be asking for help in the forums for content that can be found in the manual, easy to find... WHEN YOU ALREADY KNOW THE SYNTAX.
Thing that are also in the manual, as Conitek said, is they SUPPORT E-MAIL for everybody who purchased the PRO edition, for asking conitek support team DIRECTLY, without have to BUG the forum users, who obviously are annoyied from my dumb, simple questions.
Unfortunately, i´d never been able to found such e-mail, so i have to be a nuisance to the forum users.
For that, i´d like to sincerely apologize to EVERYONE in the Forums, since i´m a newby who DARES to ask questions that are in the manual in the "Starting with Gamestudio" section.
I´m only been using Acknetix since version A5 and never touched Lite-C, so i still have a lot to learn.
I´ve spent more than U$2000,00 in upgrades from the last years, betting in acknetix and BELIEVING that the forum would help fill the gap that syntax changes and the dreadfull development of a game that isn´t a simple puzzle would create.

I´m really gratefull for the people who took their time to answer my OBVIOUS DUMB LAZY QUESTIONS, since i barelly a scripter and more of a 3D artist.
Since i have to make ends meet in here, i also would like to thanks in advance anyone who´s willing to answer any future stupid questions, that i WILL surelly make, since that so far i only removed from the error syntax warning 8 from the 15 scripts used in this project, and still remains 10.500 lines of code to be corrected and optimized, by myself.
Once again, i´d like to apologize to the users i offended with my questions and thank the ones who spared time to answer them.


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