Jump to content




End Expected


  • You cannot reply to this topic
14 replies to this topic

#1 Symmetryc

  • Members
  • 434 posts

Posted 02 April 2013 - 02:06 PM

I'm having a problem with this code:
Spoiler
It says I'm missing an end, but I can't figure out where :/.
When I pasted my code down it screwed up the spacing, so I just colored it up since I was too lazy to respace it :P.
Thanks in advance!

#2 SuicidalSTDz

    Permutator of Strings

  • Members
  • 1,308 posts
  • LocationPennsylvania

Posted 02 April 2013 - 02:17 PM

Ok what line is it on? Secondly, what is on that line. I would rather a Necromancer spread black magic for the rest of eternity than to read all of the code you just posted...

Props for using a spoiler though ^_^


EDIT: i just indented all the code properly in Notepad++, give me the error log and I will try to find your problem

#3 Symmetryc

  • Members
  • 434 posts

Posted 02 April 2013 - 02:29 PM

View PostSuicidalSTDz, on 02 April 2013 - 02:17 PM, said:

Ok what line is it on? Secondly, what is on that line. I would rather a Necromancer spread black magic for the rest of eternity than to read all of the code you just posted...

Props for using a spoiler though ^_^


EDIT: i just indented all the code properly in Notepad++, give me the error log and I will try to find your problem
Oops, sorry, my bad. I added it in the spoiler. Thanks for helping me by the way :).

#4 SuicidalSTDz

    Permutator of Strings

  • Members
  • 1,308 posts
  • LocationPennsylvania

Posted 02 April 2013 - 02:36 PM

When you break a loop, it does not read anything from there on out. Do the stuff before you break instead.

--stuff
break

instead of

break
--stuff

#5 remiX

  • Members
  • 2,076 posts
  • LocationSouth Africa

Posted 02 April 2013 - 08:52 PM

Please copy all the code, type [code], right click -> paste as plain text, type [/code]. I beg of you.
Code tags are 1000x times better than setting your own colours

Btw, breaks and returns need to be the LAST thing in a block. Move the break to the end of the elseif block

#6 Symmetryc

  • Members
  • 434 posts

Posted 03 April 2013 - 01:24 AM

View PostremiX, on 02 April 2013 - 08:52 PM, said:

Please copy all the code, type [code], right click -> paste as plain text, type [/code]. I beg of you.
Code tags are 1000x times better than setting your own colours

Btw, breaks and returns need to be the LAST thing in a block. Move the break to the end of the elseif block
I was going to do that, but then decided against it because you wouldn't be able to see what ends what, so I decided to color it, but coloring didn't work in code text, so I just took off the code tags, but I'll keep that in mind for next time. Thanks!

View PostSuicidalSTDz, on 02 April 2013 - 02:36 PM, said:

When you break a loop, it does not read anything from there on out. Do the stuff before you break instead.

--stuff
break

instead of

break
--stuff
OK, thanks!

#7 remiX

  • Members
  • 2,076 posts
  • LocationSouth Africa

Posted 03 April 2013 - 01:26 AM

Ask anyone, everyone will say use code tags instead.
If you can't see what ends what, use indentation

#8 Symmetryc

  • Members
  • 434 posts

Posted 03 April 2013 - 01:28 AM

View PostremiX, on 03 April 2013 - 01:26 AM, said:

Ask anyone, everyone will say use code tags instead.
If you can't see what ends what, use indentation
Yeah, in the future I will.
It was indented, but when I pasted it, it came out flat :/.
Thanks again!

#9 remiX

  • Members
  • 2,076 posts
  • LocationSouth Africa

Posted 03 April 2013 - 01:53 AM

You using google chrome?
When pastebin, click the top left icon "Toggle editing mode" and then paste, indentation will remain

#10 theoriginalbit

    Semi-Professional ComputerCrafter

  • Moderators
  • 7,332 posts
  • LocationAustralia

Posted 03 April 2013 - 02:33 AM

View PostremiX, on 03 April 2013 - 01:53 AM, said:

You using google chrome?
When pastebin, click the top left icon "Toggle editing mode" and then paste, indentation will remain
or when making the code make tabs a 2 space indent instead of 4.

#11 remiX

  • Members
  • 2,076 posts
  • LocationSouth Africa

Posted 03 April 2013 - 03:49 AM

View Posttheoriginalbit, on 03 April 2013 - 02:33 AM, said:

or when making the code make tabs a 2 space indent instead of 4.

while true do
ll
test
end

...
...
..
.
..
.
doesn't work for me :/ made it 2

#12 theoriginalbit

    Semi-Professional ComputerCrafter

  • Moderators
  • 7,332 posts
  • LocationAustralia

Posted 03 April 2013 - 04:03 AM

View PostremiX, on 03 April 2013 - 03:49 AM, said:

doesn't work for me :/ made it 2
ST2 right?

make sure the "Indent Using Spaces" is checked and it will work. thats how I get the spacing on the forums all the time.

#13 remiX

  • Members
  • 2,076 posts
  • LocationSouth Africa

Posted 03 April 2013 - 04:06 AM

ST2?

Yeah I know spaces will work but I want to keep it as tabs :P

teas 
  asd
  asd
      asdasd
    asdasd

  asdasd

asdasd

hmm maybe i will use it :?

#14 theoriginalbit

    Semi-Professional ComputerCrafter

  • Moderators
  • 7,332 posts
  • LocationAustralia

Posted 03 April 2013 - 04:11 AM

View PostremiX, on 03 April 2013 - 04:06 AM, said:

ST2?
Sublime Text 2

#15 remiX

  • Members
  • 2,076 posts
  • LocationSouth Africa

Posted 03 April 2013 - 04:12 AM

Oh no, I use Notepad++

Why does firefox keep the indentation though? (even using tabs - without the replace tabs with spaces option enabled)





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users