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.
Pages: 1
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;
}
}
Offline
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
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
Everybody likes to make new Deserialisations methods.
http://pastebin.com/J6hVDect
http://pastebin.com/w7U9nNMf
Everybody edits, but some edit more than others
Offline
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
Offline
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
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
The real winner is when someone makes a proper auto-updater, then it doesn't matter if something breaks or not!
Nah
The real winner is to make one that doesn't break down when new specials are made.
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
Pages: 1
[ Started around 1732491964.6027 - Generated in 0.064 seconds, 12 queries executed - Memory usage: 1.55 MiB (Peak: 1.72 MiB) ]