I need an external python file because I'm making a leveleditor where people can change things.
I use CreateByName to load objects and substrings for their position, layer etc.
I have a few questions:
1. Why can I not use \ on the end but I have to load it in "textman" wich is a rename from Textmanipulator? (EOL error)
2. Why can't I insert the 3d box object in my application if this script is executed? (EOL error) <img src="smileys/smiley7.gif" border="0" align="middle" /> <img src="smileys/smiley3.gif" border="0" align="middle" />
I don't know much about python.
<img src="smileys/smiley19.gif" border="0" align="middle" />
---
path = System.apppath+"Data\Levels";
file = "level1"
ext = "txt"
if ListBox.GetCount == 0:
textman.SetString("\ ")
ListBox.Load(path+textman.GetLeft(1)+file+"."+ext)
l = 1
for i in range(0, ListBox.GetCount+1):
if i <= ListBox.GetCount+1:
if l == 1:
textman.SetString(ListBox.LineText(i))
# sub string 1 to 4 (name, layer, xPos, yPos)
System.CreateByName(textman.GetSubstring("'",1),textman.GetSubstring("'",2),textman.GetSubstring("'",3),textman.GetSubstring("'",4))
if i == ListBox.GetCount:
if l == 1:
msgbox.SetIcon(1)
textman.SetString(file)
textman.Uppercase()
msgbox.MessageBoxID("File Loaded",textman.GetString+" Sucessfully Loaded", 1)
l = 0
break