1. The space forums use a separate registration system from the main virtual world. To comment on these forums, you need to create a separate forum account.
    Dismiss Notice
  2. Hey there, we have two Skype groups for space early users - if you're creating content, or need help, feel free to join in either the the beginners or advanced users groups.
    Dismiss Notice

The Weird Scripting Bug Thread

Discussion in 'General' started by Adam, Mar 2, 2017.

  1. Adam

    Adam Developer Staff Member Moderator

    Hey there -

    We're tracking a couple of odd bugs with scripts, so I'd like to open the floor here to bug reports.

    Found a bug? Please post:
    • A sample script exhibiting the bug (so I can check it's not just your code)
    • Any errors/exceptions it throws in the editor
    • What you think it should do.

    Thanks!

    Adam
     
  2. Caught this one yesterday:

    The code:
    "
    if(Space.Seat.InUse()) then
    Space.Log("Sitting");
    end"

    Throws the following exception:
    "cannot access field Seat of userdata<SScript>"
     
  3. Caught this one yesterday as well:

    The code:
    "Space.Dialogues.SendLocalChat("Hi There!","Yer Mom");"

    "cannot access field Dialogues of userdata<SScript>
     
  4. Adam

    Adam Developer Staff Member Moderator

    Should be GameObject.Seat not Space.Seat -- you need to reference the gameobject with the seat property.
     
  5. Adam

    Adam Developer Staff Member Moderator

    Have found the cause of this - is fixed in the next update.
     
  6. AHA - shoulda seen this one. Gotta start keeping a close eye on the namespace.
     
  7. Hrm, Should this be Scene.Dialogues.SendLocalChat()?
     
  8. Tried it, no joy ;)
     
  9. Adam

    Adam Developer Staff Member Moderator

    Yeah you need the new EP I'll release for this function to work properly. It's a scripting doc error - the class wasn't referenced (the handwritten docs said it was, but the machine docs are correct.)
     

Share This Page