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.

Share This Page

  1. Adam

    By:AdamMar 2, 2017
    Developer
    Staff Member Moderator

    Joined:
    Aug 21, 2014
    Messages:
    630
    Likes Received:
    113
    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. James Stallings

    By:James StallingsMar 2, 2017
    Member

    Joined:
    Sep 28, 2016
    Messages:
    58
    Likes Received:
    10
    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. James Stallings

    By:James StallingsMar 2, 2017
    Member

    Joined:
    Sep 28, 2016
    Messages:
    58
    Likes Received:
    10
    Caught this one yesterday as well:

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

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

    By:AdamMar 2, 2017
    Developer
    Staff Member Moderator

    Joined:
    Aug 21, 2014
    Messages:
    630
    Likes Received:
    113
    Should be GameObject.Seat not Space.Seat -- you need to reference the gameobject with the seat property.
     
  5. Adam

    By:AdamMar 2, 2017
    Developer
    Staff Member Moderator

    Joined:
    Aug 21, 2014
    Messages:
    630
    Likes Received:
    113
    Have found the cause of this - is fixed in the next update.
     
  6. James Stallings

    By:James StallingsMar 2, 2017
    Member

    Joined:
    Sep 28, 2016
    Messages:
    58
    Likes Received:
    10
    Excellent
     
  7. James Stallings

    By:James StallingsMar 2, 2017
    Member

    Joined:
    Sep 28, 2016
    Messages:
    58
    Likes Received:
    10
    AHA - shoulda seen this one. Gotta start keeping a close eye on the namespace.
     
  8. James Stallings

    By:James StallingsMar 2, 2017
    Member

    Joined:
    Sep 28, 2016
    Messages:
    58
    Likes Received:
    10
    Hrm, Should this be Scene.Dialogues.SendLocalChat()?
     
  9. James Stallings

    By:James StallingsMar 2, 2017
    Member

    Joined:
    Sep 28, 2016
    Messages:
    58
    Likes Received:
    10
    Tried it, no joy ;)
     
  10. Adam

    By:AdamMar 2, 2017
    Developer
    Staff Member Moderator

    Joined:
    Aug 21, 2014
    Messages:
    630
    Likes Received:
    113
    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.)