Jump to content

Can't get a script to work


avianmosquito

Recommended Posts

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 Gamemode

If player.ischild 1

enable

endif

 

If player.ischild 0

disable

endif

 

 

 

Link to comment
Share on other sites

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 by avianmosquito
Link to comment
Share on other sites

You missed the 'End' to finish the GameMode block.

 

O RLY?

 

SCN CGPlayerChildGiftScript

 

begin gamemode

If player.ischild

enable

else

disable

endif

;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 by avianmosquito
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...