I have a game that requires extremely large numbers, so I'm trying to write my own addition script that adds strings. However, after an if statement, nothing in the code will execute. The beginning of my code (+ the broken if statement) looks like this (a(x) just sets a display I can see in debug to know how far it got, I just get '1')

func add(first_num, second_num):

	var num1
	var num2
	a('1')

	if first_num.length > second_num.length:
		a('3')
		num1 = first_num
		num2 = second_num

	else:
		a('4')
		num1 = second_num
		num2 = first_num

	a('2')
  • String::length() is a method, not a property. that if statement probably throws an error, check if editor reported it when running the script.

String::length() is a method, not a property. that if statement probably throws an error, check if editor reported it when running the script.

    xyz I'm using the web editor, I can't check runtime errors. Thank you, though!