Discussion Total JassHelper overhaul project

Should JassHelper be updated?

  • Yes

    Votes: 15 60.0%
  • No

    Votes: 6 24.0%
  • Wait for Vexorian

    Votes: 4 16.0%

  • Total voters
    25

Lyerae

I keep popping up on this site from time to time.
Reaction score
105
I'm starting to think indentation-based code might be a good thing for the JASS community. You won't have to deal with completely unreadable scripts, as the compiler will enforce a strict indentation-style.
 

Narks

Vastly intelligent whale-like being from the stars
Reaction score
90
a strict indentation style which prevents coders from compacting code

eg.

JASS:
if (b == true) { a = 1; } else { a = 0; }

as opposed to

JASS:
if (b == true)
    a = 1
else
    a = 0


JASS:
message = "Hello world" + CONST_SPACE_THING + "some other stuff" 
    + CONST_OBNOXIOUS_NAME + "very long indeed" + CONST_I_HATE_PHP 
    + "this could go on for a fair bit" + GetPlayerName(GetTriggerPlayer()) 
    + GetColor(GetPlayerId(GetTriggerPlayer()));


opposed to

JASS:
message = "Hello world" + CONST_SPACE_THING + "some other stuff" + CONST_OBNOXIOUS_NAME + "very long indeed" + CONST_I_HATE_PHP + "this could go on for a fair bit" + GetPlayerName(GetTriggerPlayer()) + GetColor(GetPlayerId(GetTriggerPlayer()))



how anyone can find this readable is beyond me:
JASS:
	$inputUsername = trim($_POST['inputLoginUsername'], "|")
	$inputPassword = trim($_POST['inputLoginPassword'], "|")
	$filename = "customers.txt"
	
	if (is_readable($filename))

		if (!$file = fopen($filename, "r")) 
			echo "<p>Cannot open customers.txt!</p>"
			exit
		
		$record = explode("|", fgets($file))

		while (!feof($file))
			$username = $record[1];
			$password = $record[2];

			if ($inputUsername == $username && $inputPassword == $password)
				$_SESSION['currentLogin'] = $username
				fclose($file)
				header("location:home.php")

			$record = explode("|", fgets($file))
		
		fclose($file)
		header("location:login_failed.php")
		exit
	else
		echo "<p>Could not read customers.txt - does it exist, and is it
		readable?</p>"
		exit
	echo "hello world"
 

Bribe

vJass errors are legion
Reaction score
67
What language is that? Looks like a mix of PHP and Python with a touch of "huh?"

Anyway, perhaps I should reveal what the syntax looks like when properly highlighted:

LuckSyntax.jpg
 

tooltiperror

Super Moderator
Reaction score
231
That is some seriously ugly syntax highlighting.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top