Jump to content

Entity field : nil problem


 Share

Recommended Posts

Hi,

 

i removed a script that worked fine from a character, then after reafecting the script and running it,

it says a field can not be nil.

 

But the field is not nil as i drag and drop camera entity on it. It seems a bug with script field.

entity_Nil.jpg

 

 

Does someone encountered the same problem ?

I restarted LE3 , and removed entity field dnas drag and drop it again, but still it says it is nil trying ti run the game.

 

Perhaps it's my system saying take a break laugh.png ? (what im' doing)

Stop toying and make games

Link to comment
Share on other sites

Yeah, this shouldn't happen. I never use "" for an entity type. I always use nil. To me I wonder if those entities got screwed up and you had to delete the camera and relink it. I've seen people talk about having to do that before.

Link to comment
Share on other sites

I made another test map and i have same problem but worst as using FindChild i have same message.

 

entity_Bug3.jpg

Or my system is going weird or i will need some LE3 re install ?

 

I uploaded the test map :

Put the map in Maps folder and the script in "Scripts/objects/player" and try running it.

EntityBug.zip

Stop toying and make games

Link to comment
Share on other sites

When you set that value to "" you are setting it to an empty string, which is not the same thing as nil:

    local n=""

if (n==nil) then

print("N IS NIL!!!")

else

print("N IS NOT NIL!!!")

end

 

The script you posted does not have any entity field.

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

My bad,

I removes all ressources the script was loading , because these ressources (pics, sounds) are not part of LE3 package,

and i had no problem with camera using the two versions :

 

Script.Camera = "" --entity
Script.Camera = nil --entity

 

The error message was not precise and mislead me to think it was that line the problem, but in fact it was ressources not loaded and used in script it seems.

 

The thread can be closed smile.png

  • Upvote 2

Stop toying and make games

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

×
×
  • Create New...