Gamestudio Links
Zorro Links
Newest Posts
Strange "Alien" Skull created with >Knubber<
by NeoDumont. 04/10/26 18:58
400 free seamless texture pack downl. here !
by NeoDumont. 04/08/26 19:55
ZorroGPT
by TipmyPip. 04/08/26 17:08
TMFs on options in live trading
by Spirit. 03/26/26 19:52
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
1 registered members (TipmyPip), 3,869 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
ondrej, mredit, vestriaa, Lukudo, mldenoiser
19205 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