Comment with syntax error??

Author Topic: Comment with syntax error??  (Read 1112 times)

The story starts when I was lying in bed, and I suddenly had this awesome idea to make a Blockland Brick Generator in Visual Studio 2010...and that's what I did. It lets you make (simple) custom brick packs. The code worked 100%, but when I made a pack with big baseplates, they weren't there. This is what I found in console.log:

Code: [Select]
Loading Add-On: Brick_BigBaseplates (CRC:-148661594)
Add-Ons/Brick_BigBaseplates/server.cs Line: 1 - Syntax error.
>>> Some error context, with ## on sides of error halt:
##»##¿//Created with Legojak's Blockland Brick Generator v1



datablock fxDTSBrickData (brick128x128BaseData)

{

   brickFile = "./128x128 Base.blb";

   category = "Baseplates";

   subCategory = "Plain";

   uiName = "128x128 Base";

}



datablock fxDTSBrickData (brick256x256BaseData)
>>> Error report complete.

ADD-ON "Brick_BigBaseplates" CONTAINS SYNTAX ERRORS

So it looks like there's either something wrong with the comments, or some weird invisible text before it.

Also, here's the code that creates the scripts and packages them:
http://pastebin.com/8MdMaqvj

I'm not going to post the entire source or the release files so that everybody's making bricks before I even finish the project......

One last thing: this is a Windows only project. When this gets released, I'll upload the source code so that all you Mac people can try to make your own.

Anyway, please help! I KNOW there are builders out there missing a 3x3 brick/plate, looking for a way to keep people from stealing builds, or just to keep the lag down in their server (including my sister  :cookieMonster:)!
« Last Edit: July 25, 2012, 01:17:36 PM by Legojak »

Prior to your comment you have two symbols, » and ¿. Remove them.

I'm not 100% sure what's wrong with your source code, but try this:

At the top of your function, have:
ASCIIEncoding ascii = new ASCIIEncoding();

Then, for each of your My.Computer.FileSystem.WriteA llText calls, change them to this format:

My.Computer.FileSystem.WriteAllText("C:\server.cs", DATA, false, ascii);

ASCII is normal text, it is what Blockland will read best. UTF-8 is default, which supports those crazy symbols.
« Last Edit: July 25, 2012, 01:40:04 PM by Slick555 »

Not sure if Visual Studio 2010 is the best thing to use for TorqueScript. Whoops, misread.
Oh, also, your baseplates won't work as intended. They're too big.
« Last Edit: July 25, 2012, 01:33:20 PM by otto-san »

God damn it I feel like I just learned how to program in Visual Studio 2010 to help this guy.
« Last Edit: July 25, 2012, 01:44:58 PM by Slick555 »

God damn it I feel like I just learned how to program in Visual Studio 2012 to help this guy.
the stuff we do in coding help...

I'm not going to post the entire source or the release files so that everybody's making bricks before I even finish the project......
You are aware there are several brick makers already released?



I can't help you out much with this language, but I will warn you that extremely long lines (such as line 26/66) is bad practice

I have already made one of these, but mine's open source.
Anyway, you have some sort of error in your vbcode, and it's best if you go to a different website like stackoverflow to get help with that, not here.

Also I thought ionic.zip was only for C#

@Slick555
I'll try that, and thanks for being the one with actual help with the problem.

@otto-san
Then I'll make MEGA PLATES! >:D

@Headcrab Zombie
Too late.

@Ipquarx
Turns out it works for both. :3

@otto-san
Then I'll make MEGA PLATES! >:D
no

Blockland simply does not allow for bricks bigger than 64x, it just will not happen

Well, I got it all working. If you're here because you have the same problem, this is how to fix it. Slick555 didn't get the code right, but he knew exactly what was wrong. To fix it:

Code: [Select]
My.Computer.FileSystem.WriteAllText("C:\server.cs", "Your Code Here"+vbnewline+"Second line here", False, [b]System.Text.Encoding.ASCII[/b])
Locking....