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, if you want some direct help without hopping inworld - try our Discord channel at https://discord.gg/mptfycQ
    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:
    695
    Likes Received:
    137
    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:
    69
    Likes Received:
    18
    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:
    69
    Likes Received:
    18
    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:
    695
    Likes Received:
    137
    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:
    695
    Likes Received:
    137
    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:
    69
    Likes Received:
    18
    Excellent
     
  7. James Stallings

    By:James StallingsMar 2, 2017
    Member

    Joined:
    Sep 28, 2016
    Messages:
    69
    Likes Received:
    18
    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:
    69
    Likes Received:
    18
    Hrm, Should this be Scene.Dialogues.SendLocalChat()?
     
  9. James Stallings

    By:James StallingsMar 2, 2017
    Member

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

    By:AdamMar 2, 2017
    Developer
    Staff Member Moderator

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