Gamestudio Links
Zorro Links
Newest Posts
Zorro version 3.0 prerelease!
by TipmyPip. 02/20/26 13:22
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 02/19/26 13:22
Camera always moves upwards?
by VoroneTZ. 02/19/26 13:13
Hedge on FXCM, 4 or 5?
by Martin_HH. 02/16/26 16:09
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
3 registered members (TipmyPip, Quad, AndrewAMD), 10,074 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
alx, ApprenticeInMuc, PatrickH90, USER0328, Sfrdragon
19199 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 | 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