Gamestudio Links
Zorro Links
Newest Posts
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 05:41
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
2 registered members (AbrahamR, AndrewAMD), 1,278 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Compiling error with max(), min() #153839
09/13/07 08:10
09/13/07 08:10
Joined: Aug 2005
Posts: 1,558
HK
V
vlau Offline OP
Serious User
vlau  Offline OP
Serious User
V

Joined: Aug 2005
Posts: 1,558
HK
I've got the compiling error with the following codes:
Code:

// main.c
#include <acknex.h>
#include <default.c>

var aa;
var bb;
var cc;

void main()
{
level_load("");
bb = 10;
cc = 20;
aa = max(bb,cc);
}



Compiling MAIN.c........
Error in 'MAIN' line 14 : 'max' undeclared identifier
<aa = max(bb,cc);>

Can't compile MAIN.c
Startup failure - any key to abort

Same with aa = min(bb,cc);

Re: Compiling error with max(), min() [Re: vlau] #153840
09/13/07 10:18
09/13/07 10:18
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
max() is a standard C macro and can't be used for an engine function under lite-C. Use maxv() instead.

http://manual.conitec.net/avar-max.htm

Re: Compiling error with max(), min() [Re: jcl] #153841
09/13/07 15:49
09/13/07 15:49
Joined: Aug 2005
Posts: 1,558
HK
V
vlau Offline OP
Serious User
vlau  Offline OP
Serious User
V

Joined: Aug 2005
Posts: 1,558
HK
Ok, thanks.

Re: Compiling error with max(), min() [Re: vlau] #153842
09/13/07 19:22
09/13/07 19:22
Joined: Sep 2003
Posts: 9,859
F
FBL Offline
Senior Expert
FBL  Offline
Senior Expert
F

Joined: Sep 2003
Posts: 9,859
Is this documented in the manual meanwhile?
I had the same problem recently and couldn't find it in the manual... I tried until I found the right call

Re: Compiling error with max(), min() [Re: FBL] #153843
09/13/07 20:03
09/13/07 20:03
Joined: Aug 2005
Posts: 1,558
HK
V
vlau Offline OP
Serious User
vlau  Offline OP
Serious User
V

Joined: Aug 2005
Posts: 1,558
HK
uh not yet I think, cos I can't found any info
about maxv and minv from the manual, even the
migration page too!

Re: Compiling error with max(), min() [Re: vlau] #153844
09/24/07 23:19
09/24/07 23:19
Joined: Jul 2007
Posts: 53
Germany
Henning Offline
Junior Member
Henning  Offline
Junior Member

Joined: Jul 2007
Posts: 53
Germany
there seems to be a similar problem with frc() and int(). These display the same error message.
Do frcv() and intv() exist?

Re: Compiling error with max(), min() [Re: Henning] #153845
09/25/07 03:22
09/25/07 03:22
Joined: Oct 2006
Posts: 873
S
Shadow969 Offline
User
Shadow969  Offline
User
S

Joined: Oct 2006
Posts: 873
yes, you can see these functions in afuncs.h
EDIT: sorry, int() changed to integer(), and frc() changed to fraction(). Anyway most changed to sinv, cosv and so on


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