When you call a function, you don't use function start_battle();
, you just use start_battle();
.
When you pass a value to a function, you need to use this syntax: start_battle(param1, param2);
.
When you want to get a value from a function, you need to return it in the function, like so:
function start_battle(param1) {
// Do something
return param1;
}
When you want to store a returned value from a function, you do something like: var returned = start_battle(param1);
And the fact that you don't know why the modal just hangs, means that you didn't check the browser's error console, which can hold some pretty important information on what's wrong. Try checking that and posting here so we can see the current problem
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…