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
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (Akow, TipmyPip, tomaslolo), 788 guests, and 11 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19055 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
"Can not convert 'struct MATERIAL' to 'POINTER'" #295416
10/25/09 02:40
10/25/09 02:40
Joined: Aug 2005
Posts: 336
Connecticut
Galen Offline OP
Senior Member
Galen  Offline OP
Senior Member

Joined: Aug 2005
Posts: 336
Connecticut
Hello,

The following code is giving me an error when I try to run my level: "Can not convert 'struct MATERIAL' to 'POINTER'" and it gives the error line as "my.material = mat_flat;" below:



MATERIAL* mat_flat =
{
mat_flat.effect =
"
TECHNIQUE* mat_flat
{
pass p0 {shademode=Flat;fillmode = solid;}

}
";
mat_flat.ambient_blue = 130;
mat_flat.ambient_green = 130;
mat_flat.ambient_red = 130;
mat_flat.albedo = -100;
}


action MyFlatEntity()
{
my.material = mat_flat;
}


Can anyone tell me what I'm doing wrong? I've been looking in the manual but nothing is helping me yet...

Thanks!

Re: "Can not convert 'struct MATERIAL' to 'POINTER'" [Re: Galen] #295421
10/25/09 04:04
10/25/09 04:04
Joined: Aug 2005
Posts: 336
Connecticut
Galen Offline OP
Senior Member
Galen  Offline OP
Senior Member

Joined: Aug 2005
Posts: 336
Connecticut
Never mind, I figured it out. Needed to change the "mat_" to "mtl_". Did not realize, as I am attempting to upgrade my C-Script to C-Like for first time, lol


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