Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
1 registered members (TipmyPip), 18,528 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 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