YouGroove Posted February 6, 2015 Share Posted February 6, 2015 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. 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 ? (what im' doing) Stop toying and make games Link to comment Share on other sites More sharing options...
AggrorJorn Posted February 6, 2015 Share Posted February 6, 2015 Try replacing nil with double quotes. Script.camera = "" --entity 1 Link to comment Share on other sites More sharing options...
YouGroove Posted February 6, 2015 Author Share Posted February 6, 2015 Thanks Aggror, it worked. Why is not nil replaced by the entity we drag and drop ? It is a bug or a convention ? Stop toying and make games Link to comment Share on other sites More sharing options...
Rick Posted February 6, 2015 Share Posted February 6, 2015 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 More sharing options...
YouGroove Posted February 6, 2015 Author Share Posted February 6, 2015 I tried remove and put script then relink camera entity, but no way, the only soluction was Aggro one, put " ". Stop toying and make games Link to comment Share on other sites More sharing options...
Rick Posted February 6, 2015 Share Posted February 6, 2015 No, this is a bug somewhere because in the game I'm working on right now I do the exact same thing and I have Script.camera = nil --entity "Camera" And it works just fine. Link to comment Share on other sites More sharing options...
AggrorJorn Posted February 6, 2015 Share Posted February 6, 2015 I don't why this is. I used to be able to put nil instead of "". Perhaps this has changed over time. Perhaps it is because you are specifying a name? Just guessing really. Link to comment Share on other sites More sharing options...
YouGroove Posted February 6, 2015 Author Share Posted February 6, 2015 I made another test map and i have same problem but worst as using FindChild i have same message. 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 More sharing options...
Josh Posted February 6, 2015 Share Posted February 6, 2015 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 More sharing options...
YouGroove Posted February 6, 2015 Author Share Posted February 6, 2015 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 2 Stop toying and make games Link to comment Share on other sites More sharing options...
Rick Posted February 6, 2015 Share Posted February 6, 2015 Yeah, I figured it had to be something else because I use that all the time. Link to comment Share on other sites More sharing options...
Josh Posted February 6, 2015 Share Posted February 6, 2015 Woot, thanks guys. 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 More sharing options...
Recommended Posts