What is the "metadata" keyword?

You can talk about ManiaScript for ManiaPlanet here

Moderator: English Moderator

User avatar
maxi031
Posts: 377
Joined: 17 Jul 2011, 00:55

Re: What is the "metadata" keyword?

Post by maxi031 » 05 Oct 2015, 23:07

I think you can not, i tried before it is declared as "something" without error but i too could not initialize it.
My specs:
MOBO: MB AM3+ 970 Gigabyte GA-970A-DS3P
CPU: AM3+ AMD FX-8320E
GPU: Nvidia GeForce GTX750-Ti ASUS 2GB DDR5
RAM: DDR3 8GB 1866MHz Kingston HyperX
SSD: SATA3 120gb SanDisk
OS: Ubuntu 19.04
TY MICMO

User avatar
spaii
Posts: 1100
Joined: 19 Jun 2010, 00:04
Location: Rémy - France
Contact:

Re: What is the "metadata" keyword?

Post by spaii » 06 Oct 2015, 01:43

Try :

Code: Select all

declare metadata Integer[][][] MetaIntArray3 for Map = [[[1,10,23],[3,6,9]],[[1,2]]];
declare metadata Integer[][][] MetaIntArray4 for Map = [[[0, 1],[2, 3],[4, 5]]];
concerning

Code: Select all

// declare metadata Ident  MetaIdent  for Map;
Try:

Code: Select all

declare metadata MetaIdent  for Map = Ident;
Not sure you can store an Ident after in script (my tests on this part of maniascript are from 2012...)
Tell me if you can ;)
Hope this help ;)

User avatar
Electron
Posts: 790
Joined: 15 Jun 2010, 18:02
Contact:

Re: What is the "metadata" keyword?

Post by Electron » 06 Oct 2015, 06:10

spaii wrote:Try :

Code: Select all

declare metadata Integer[][][] MetaIntArray3 for Map = [[[1,10,23],[3,6,9]],[[1,2]]];
declare metadata Integer[][][] MetaIntArray4 for Map = [[[0, 1],[2, 3],[4, 5]]];
This syntax works. Thank you!
spaii wrote:Not sure you can store an Ident after in script (my tests on this part of maniascript are from 2012...)
Tell me if you can ;)
It's still not possible. Do you know the declaration of Ident and NullId?

reaby
Posts: 1022
Joined: 29 Dec 2010, 23:26
Location: Eastern Finland
Contact:

Re: What is the "metadata" keyword?

Post by reaby » 06 Oct 2015, 07:30

For what i know, it's possible to initialize empty type also, like spaii wrote earlier:

Code: Select all

declare persistent Vec3[Text][Text][Text] eXp_widgetLastPos = Vec3[Text][Text][Text];
works for normal persistent variables, i'm not 100% sure how it works on metadata.

you should be able to declare Ident and NullId as type:

Code: Select all

declare metadata Ident MetaIdent for Map = Ident;

User avatar
spaii
Posts: 1100
Joined: 19 Jun 2010, 00:04
Location: Rémy - France
Contact:

Re: What is the "metadata" keyword?

Post by spaii » 06 Oct 2015, 10:59

This works :

Code: Select all

declare metadata Ident MetaIdent for Map = NullId;
declare metadata MetaIdentTest for Map = NullId;
declare metadata MetaIntArray3 for Map = Integer[][][];

Post Reply

Return to “ManiaScript”

Who is online

Users browsing this forum: No registered users and 1 guest