Skip to content

Commit c930529

Browse files
committed
Fixing empty lines error on a clean dialogic build
Update README.md
1 parent 43e3632 commit c930529

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ You can also install Dialogic using the **AssetLib** tab in the editor, but the
2121
## 📃 Credits
2222
Made by [Emilio Coppola](https://github.com/coppolaemilio) and [Jowan-Spooner](https://github.com/Jowan-Spooner).
2323

24-
Contributors: [zaknafean](https://github.com/zaknafean),[thebardsrc](https://github.com/thebardsrc), [AnidemDex](https://github.com/AnidemDex), [Arnaud](https://github.com/arnaudvergnet), [ellogwen](https://github.com/ellogwen), [Tim Krief](https://github.com/timkrief), [and more!](https://github.com/coppolaemilio/dialogic/graphs/contributors). Special thanks: [Toen](https://twitter.com/ToenAndreMC), Òscar, [Francisco Presencia](https://francisco.io/), [M7mdKady14](https://github.com/M7mdKady14).
24+
Contributors: [zaknafean](https://github.com/zaknafean), [thebardsrc](https://github.com/thebardsrc), [and more!](https://github.com/coppolaemilio/dialogic/graphs/contributors).
25+
26+
Special thanks: [Arnaud](https://github.com/arnaudvergnet), [AnidemDex](https://github.com/AnidemDex), [ellogwen](https://github.com/ellogwen), [Tim Krief](https://github.com/timkrief), [Toen](https://twitter.com/ToenAndreMC), Òscar, [Francisco Presencia](https://francisco.io/), [M7mdKady14](https://github.com/M7mdKady14).
2527

2628
### Thank you to all my [Patreons](https://www.patreon.com/coppolaemilio) and Github sponsors for making this possible!
2729

addons/dialogic/Events/Text/event.gd

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,8 @@ func get_as_string_to_store() -> String:
102102
return Text.replace("\n", "\\\n")
103103

104104
## THIS HAS TO READ ALL THE DATA FROM THE SAVED STRING (see above)
105-
func load_from_string_to_store(string:String):
106-
var reg = RegEx.new()
105+
func load_from_string_to_store(string:String) -> void:
106+
var reg := RegEx.new()
107107
reg.compile("((?<name>[^:()\\n]*)?(?=(\\([^()]*\\))?:)(\\((?<portrait>[^()]*)\\))?)?:?(?<text>(.|(?<=\\\\)\\n)+)")
108108
var result = reg.search(string)
109109
if result and !result.get_string('name').is_empty():
@@ -116,7 +116,8 @@ func load_from_string_to_store(string:String):
116116
if !result.get_string('portrait').is_empty():
117117
Portrait = result.get_string('portrait').strip_edges()
118118

119-
Text = result.get_string('text').replace("\\\n", "\n").strip_edges()
119+
if result:
120+
Text = result.get_string('text').replace("\\\n", "\n").strip_edges()
120121

121122
func is_valid_event_string(string):
122123
return true

0 commit comments

Comments
 (0)