Official Everybody Edits Forums

Do you think I could just leave this part blank and it'd be okay? We're just going to replace the whole thing with a header image anyway, right?

You are not logged in.

#1 2018-09-02 18:36:14

italkalotfromee
Member
Joined: 2015-05-08
Posts: 117

Map arrays

Is there a way i can write a map array to use for everybody edits? Due to the following way I'm trying i get the error:

C# wrote:

Message only supports objects of types: string, integer, boolean, byte[], float, double, uint, long & ulong. Type 'System.Int32[,]' is not supported.

My code:

        public class Map
        {
            public void Draw(int[,] bid)
            {
                for (int x = 0; x < 6; x++)
                    for (int y = 0; y < 6; y++)
                        con.Send("b", 0, x, y, bid);
            }
        }

Case "b" code:

Map map = new Map();

map.Draw(new int[,]
{
{ 0, 0, 0, 0, 0, 0 }
});

Any ideas? Suggestions, Anyone //forums.everybodyedits.com/img/smilies/big_smile


FluxBB bbcode test

Offline

#2 2018-09-02 18:47:55

drunkbnu
Formerly HG
Joined: 2017-08-16
Posts: 2,306

Re: Map arrays

You're trying to send the whole block array, when you should send the element of the array with the coordinates from the loop.

con.Send("b", 0, x, y, bid[x, y]);

Offline

Wooted by: (2)

#3 2018-09-02 19:13:57

italkalotfromee
Member
Joined: 2015-05-08
Posts: 117

Re: Map arrays

HG wrote:

You're trying to send the whole block array, when you should send the element of the array with the coordinates from the loop.

con.Send("b", 0, x, y, bid[x, y]);

appreciate it - that fixed it.


FluxBB bbcode test

Offline

italkalotfromee1535912037722915

Board footer

Powered by FluxBB

[ Started around 1732356102.6027 - Generated in 0.156 seconds, 12 queries executed - Memory usage: 1.39 MiB (Peak: 1.5 MiB) ]