avianmosquito Posted April 19, 2012 Share Posted April 19, 2012 This is supposed to be a nice, simple script on a duffle bag I'm placing in Doc Mitchell's house by the player's bedside. It's supposed to detect if the player is a child (a feature already added in my mod) and if so, enable the bag. If not, it's also supposed to immediately disable the bag. The bag contains a few toys, some soda and some clothing. For some reason, it won't work. I'm not sure what I'm missing, but I'm clearly missing something. Will somebody please tell me what I'm doing wrong? SCN CGPlayerChildGiftScript Begin GamemodeIf player.ischild 1 enableendif If player.ischild 0 disableendif Link to comment Share on other sites More sharing options...
tunaisafish Posted April 19, 2012 Share Posted April 19, 2012 Try this... If player.ischild enable else disable endif If you wanted to compare the result of a function like IsChild to a number, then you'd need '==' between them. Link to comment Share on other sites More sharing options...
avianmosquito Posted April 19, 2012 Author Share Posted April 19, 2012 (edited) Try this... If player.ischild enable else disable endif If you wanted to compare the result of a function like IsChild to a number, then you'd need '==' between them. Alright. Still doesn't work. Thank you anyway. To be more specific, the script refuses to compile. Probably a syntax error, but I'm now using exactly what you have. No idea what the issue is. Edited April 19, 2012 by avianmosquito Link to comment Share on other sites More sharing options...
tunaisafish Posted April 19, 2012 Share Posted April 19, 2012 You missed the 'End' to finish the GameMode block. Link to comment Share on other sites More sharing options...
avianmosquito Posted April 19, 2012 Author Share Posted April 19, 2012 (edited) You missed the 'End' to finish the GameMode block. O RLY? SCN CGPlayerChildGiftScript begin gamemodeIf player.ischild enableelse disableendif;Is this not it? Note: I'm new at this. I've made maybe half a dozen scripts that actually worked, and maybe half a dozen more that didn't. Keep that in mind. Edited April 19, 2012 by avianmosquito Link to comment Share on other sites More sharing options...
tunaisafish Posted April 19, 2012 Share Posted April 19, 2012 (edited) O RLY? Uhu, Rly.Compiles fine once you add the 'End' :) (The End closes the Begin, the endif closes the if) Edited April 19, 2012 by tunaisafish Link to comment Share on other sites More sharing options...
avianmosquito Posted April 19, 2012 Author Share Posted April 19, 2012 O RLY? Uhu, Rly.Compiles fine once you add the 'End' :) (The End closes the Begin, the endif closes the if) Sorry, new guy. Thought it was all one block. Never done anything other than a script effect before. Link to comment Share on other sites More sharing options...
Quetzlsacatanango Posted April 19, 2012 Share Posted April 19, 2012 (edited) ninja'd and nicer about it too Edited April 19, 2012 by Quetzlsacatanango Link to comment Share on other sites More sharing options...
avianmosquito Posted April 21, 2012 Author Share Posted April 21, 2012 Yeah, concept didn't work anyway. Apparently the player is not flagged as a child, even if using a default child race. Link to comment Share on other sites More sharing options...
Recommended Posts