Question ? Fatal Eror

General talk about editing, cheating, and deprotecting maps.

Moderator: Cheaters

krille
Newcomer
Posts: 17
Joined: May 28th, 2008, 1:56 am

Re: Question ? Fatal Eror

Post by krille »

JJ2197 wrote:At first I thought this was some sort of Uber map protection... then later found out it
was actually like a "script error" but it would not crash the map unless you edited the script...
I don't know how to explain it... anyways I'm going to keep it to myself... haha ;)
Here is a link to the map without the "Uber map protection error"

http://rapidshare.com/files/118351518/C ... d.w3x.html
I will try to find it myself, of course, but could you please at least PM me the answer? I'd love to know and learn more. I lots of things are very poorly documented publicly.

edit: So, what exactly was wrong with lines 325 to 347? The apostrophes/single quotes? The line breaks? I don't know the JASS standards well enough to know what's actually wrong here. Again, you can help me out in PM if you prefer that way. Thanks!

edit2: Could it be that the line(s) were simply too long?
Bushido

Re: Question ? Fatal Eror

Post by Bushido »

to ur second edit:
it doesn't matter how long it is..
also , i'm sure JJ wouldn't pm u the answer :D
krille
Newcomer
Posts: 17
Joined: May 28th, 2008, 1:56 am

Re: Question ? Fatal Eror

Post by krille »

King-Bushido wrote:to ur second edit:
it doesn't matter how long it is..
also , i'm sure JJ wouldn't pm u the answer :D
Do you know it? Did you spot it yourself or were you told? Just asking.

(Btw, abusing lack of documentation to "protect" maps is just lame imo.)

edit: And yeah, I know it's something about those quotes. By replacing two of the strings with just "aaaa" and "bbb" I was able to "unprotect" it myself. I'll look into it further. But what's the point in wasting other people's time just to boast how 1337 you are... I don't like it either.

edit2: So far I've found that removing "Statue of Liberty requires Biology now." fixes the crashes. I can't explain it though.

edit3: I'm not sure you're right.

Original: "Statue of Liberty requires Biology now."
"Statue of Liberty requires Biol" works
"Statue of Liberty requires Biolo" does not
"Statue of Liberty requires Biola" does not
"Stue of Liberty requires Biolo" works

It appears that cutting any eight characters works. I tried cutting eight characters from different parts of the same quote, the map now works. Super weird. I wonder what makes it run before saving. Hmm...

edit4: Holy Macaroni!

I'm sure I've found the solution.

Code: Select all

"Defeat changed completely. You will now lose control of your units when you lose your capital. You are no longer kicked from the game though.
Spawn Jumping should be fixed.
Terrain changed on top
Ships now land units right near the bottom towers.
Peons can't take over points anymore.
New System of for buying and selling resources. Team trading is eliminated.
Markets can be deactivated.
Markets only provide income when they are finished
Banks/Stocks now give income based on what you had at the tick
MULTIBALL! I mean, MULTIBOARD!
Income code cleaned and consolidated, should cause less lag every tick.
Leaver's capitals now turn into a number of windmill's or granary's based on how much food the capital produced.
Changelog placed in Quests.
Markets can be upgraded (but upgraded ones can't be deactivated)
Leaver units now given out correctly
Lumber buying and selling now comes with a 25% loss, just like everything else in the game.
don't click me and Sell Materials seperated.
Statue of Liberty requires Biology now."
Is 1033 characters. 1033-8=1025, then remove the two quotes and add a \00 (at least you add the \00 in C++ strings) and you end up at 1024. Peculiar number, eh? It looks like a hard cap/limit of some sort.

But why - in that case - did the original work? That doesn't make sense?

Well, actually it does. In Windows the common "carriage return" is CrLf (CarriageReturn 0x0D + LineFeed 0x0A), however this ain't universal, in some systems it's only Cr or 0x0D. That's how the original's saved. But JassCraft then converts all Cr into CrLf when saving, making the string exceed the 1023/1024 character limit (due to each line break now taking up four bytes instead of two). A simple HEX EDIT of the Original war3map.j compared to the re-saved war3map.j confirms this.

Is this even documented?

Anyway, this is the solution, right? If you don't want to say it in public, then you can PM.

~ Kris