Skip to content

Commit a52428a

Browse files
author
ShinkoNet
committed
Branch export GUI bugfix
range wasn't being parsed correctly
1 parent c67e262 commit a52428a

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

scripts/draw_window_branch_export/draw_window_branch_export.gml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -169,14 +169,16 @@ if (selected_tab_sch = 0) {
169169
if (draw_button2(x1 + 470, y1 + 368, 72, "Export") && wmenu = 0) {
170170
if (sch_exp_totalblocks[sch_exp_includelocked] <= 0) {
171171
message("There are no blocks to export!", "Branch export")
172-
} else if sch_exp_range_start > sch_exp_range_end {
173-
message("Starting tick must be lower than ending tick!", "Branch export")
174-
} else if sch_exp_range_end = 0 {
172+
} else if sch_exp_range_end = 0 || sch_exp_range_start = "" || sch_exp_range_end = "" {
175173
message("Please enter a range!", "Branch export")
176-
} else if sch_exp_range_end > enda {
174+
} else if real(sch_exp_range_start) > real(sch_exp_range_end) {
175+
message("Starting tick must be lower than ending tick!", "Branch export")
176+
} else if real(sch_exp_range_end) > enda {
177177
message("The ending tick is larger than the song!\nThe size of the song is " + string(enda) + ".", "Branch export")
178178
}
179179
else {
180+
sch_exp_range_start = real(sch_exp_range_start)
181+
sch_exp_range_end = real(sch_exp_range_end)
180182
branch_export()
181183
}
182184
}

0 commit comments

Comments
 (0)