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 2015-03-06 22:27:57

realmaster42
Formerly marcoantonimsantos
From: ̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍
Joined: 2015-02-20
Posts: 1,380
Website

[World Deserializer] Halp

The first time works correctly, but second doesn't...

Anyone knows how to fix?

while (c < m.Count && !(m[c].ToString().StartsWith("PW") || m[c].ToString().StartsWith("BW")))
            {
                if (m[c].ToString() != "we")
                {
                    int bid = m.GetInt(c);
                    for (int n = 0; n < m.GetByteArray(c + 2).Length; n += 2)
                    {
                        int x = m.GetByteArray(c + 2)[n] << 8 | m.GetByteArray(c + 2)[n + 1];
                        int y = m.GetByteArray(c + 3)[n] << 8 | m.GetByteArray(c + 3)[n + 1];
                        //total = 100 - ((Variables.worldHeight - y + Variables.worldWidth - x) / 100) * 10;
                        //DeserializeBar.Value = total;
                        Variables.block[x, y].BlockID = bid;
                    }
                    c += 4;
                }
                else
                {
                    break;
                }
            }

http://i.imgur.com/bjvgH5L.png?1

Offline

Wooted by:

#2 2015-03-07 00:07:11, last edited by Processor (2015-03-07 00:07:43)

Processor
Member
Joined: 2015-02-15
Posts: 2,246

Re: [World Deserializer] Halp

Your problem is that it doesn't handle special blocks like portals, coindoors, signs, labels, world portals, music blocks, rotatables, hazards, switches and so on... You would need to write special handlers for each of those block types.

Can we stop writing new world deserializers?

http://pastebin.com/9uFrYtYp
https://github.com/Yonom/CupCake/blob/m … ice.cs#L57
https://github.com/Yonom/BotBits/blob/m … ils.cs#L14
https://github.com/ThyChief/Fluid/blob/ … ld.cs#L693
https://github.com/Seist/Skylight/blob/ … ls.cs#L343


I have never thought of programming for reputation and honor. What I have in my heart must come out. That is the reason why I code.

Offline

Wooted by: (3)

#3 2015-03-07 06:29:57, last edited by Lionhart (2015-03-07 06:33:32)

Lionhart
Member
Joined: 2015-02-17
Posts: 40

Re: [World Deserializer] Halp

Processor wrote:

Can we stop writing new world deserializers?

Never!

public void BeatTheDeadHorse(Message stick) { ...

Also, I like the complete lack of comments and strange variable names such as "c" and "Variables".

Offline

Wooted by: (2)

#4 2015-03-07 08:25:38

Zumza
Member
From: root
Joined: 2015-02-17
Posts: 4,656

Re: [World Deserializer] Halp

Everybody likes to make new Deserialisations methods. //forums.everybodyedits.com/img/smilies/smile
http://pastebin.com/J6hVDect
http://pastebin.com/w7U9nNMf


Everybody edits, but some edit more than others

Offline

Wooted by:

#5 2015-03-07 13:43:47

realmaster42
Formerly marcoantonimsantos
From: ̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍
Joined: 2015-02-20
Posts: 1,380
Website

Re: [World Deserializer] Halp

Processor wrote:

Your problem is that it doesn't handle special blocks like portals, coindoors, signs, labels, world portals, music blocks, rotatables, hazards, switches and so on... You would need to write special handlers for each of those block types.

Can we stop writing new world deserializers?

http://pastebin.com/9uFrYtYp
https://github.com/Yonom/CupCake/blob/m … ice.cs#L57
https://github.com/Yonom/BotBits/blob/m … ils.cs#L14
https://github.com/ThyChief/Fluid/blob/ … ld.cs#L693
https://github.com/Seist/Skylight/blob/ … ls.cs#L343

'Handle special blocks', does now, but doesn't get all block info when joining world yet... just after placing


http://i.imgur.com/bjvgH5L.png?1

Offline

Wooted by:

#6 2015-03-14 21:42:03

stilltoolazytomakeanacc
Member
Joined: 2015-03-14
Posts: 1

Re: [World Deserializer] Halp

Let's just keep making more deserializers.
In my defense, I made mine before y'all came out distributing yer own.
So there.

The real winner is to make one that doesn't break down when new specials are made.

That way bots can last longer.

And then when NVD decides to reorder existing messages, thereby breaking off reverse-compatibility with old bots, someone knock sense into 'em

Offline

Wooted by: (3)

#7 2015-03-14 22:29:14

lrussell
Member
From: Saturn's Titan
Joined: 2015-02-15
Posts: 843
Website

Re: [World Deserializer] Halp

stilltoolazytomakeanacc wrote:

Let's just keep making more deserializers.
In my defense, I made mine before y'all came out distributing yer own.
So there.

The real winner is to make one that doesn't break down when new specials are made.

That way bots can last longer.

And then when NVD decides to reorder existing messages, thereby breaking off reverse-compatibility with old bots, someone knock sense into 'em

The real winner is when someone makes a proper auto-updater, then it doesn't matter if something breaks or not!

Offline

Wooted by: (2)

#8 2015-03-19 17:28:23

Processor
Member
Joined: 2015-02-15
Posts: 2,246

Re: [World Deserializer] Halp

lrussell wrote:

The real winner is when someone makes a proper auto-updater, then it doesn't matter if something breaks or not!

Nah //forums.everybodyedits.com/img/smilies/tongue

stilltoolazytomakeanacc wrote:

The real winner is to make one that doesn't break down when new specials are made.

I win.


I have never thought of programming for reputation and honor. What I have in my heart must come out. That is the reason why I code.

Offline

Wooted by:
Processor1426782503484535

Board footer

Powered by FluxBB

[ Started around 1732817745.4588 - Generated in 0.059 seconds, 12 queries executed - Memory usage: 1.55 MiB (Peak: 1.73 MiB) ]