Skip to content

Current questions and answers regarding the map editor.

User Avatar
#5150
Auto-translated
}{0TT@6bI4

I suggest this code.
I knew I should check the code... even though I didn't see any errors at first glance.
1) firstvis=0; how does this variable behave outside the function? (Does it need to be initialized with anything? Global or something else?)
2) Did we write xt, yt, zt == x, y, z correctly? Without declaring the data type.
3) The script editor gives an error in the line below.
elseif firstvis>=1 and xt,yt,zt == x,y,z then

*I'm not familiar with the Lua language, but I tried the following:
*Specifying the data type... number or something else... the error didn't disappear.
*Deleting the condition (firstvis>=1 and xt,yt,zt == x,y,z) then it stopped complaining.
*Putting the entire condition in parentheses also didn't help.
Attachments 1
1 file attached • Total size: 7.7 KB