Results 1 to 18 of 18

Thread: Odd Error

  1. #1
    Join Date
    Dec 2009
    Location
    R_GetPlayerLoc;
    Posts
    2,235
    Mentioned
    0 Post(s)
    Quoted
    14 Post(s)

    Default Odd Error

    I keep on getting a type mismatch error when running this and the NPC I'm looking for is not on the main-screen.

    Here's the code: http://paste.villavu.com/show/MCIa1d6DgZUk6xBuun1P/
    "Logic never changes, just the syntax" - Kyle Undefined?

    Remember, The Edit Button Is There For A Reason!!!

  2. #2
    Join Date
    Feb 2011
    Location
    The Future.
    Posts
    5,600
    Mentioned
    396 Post(s)
    Quoted
    1598 Post(s)

    Default

    Type mismatch cant be from it not being on screen :S... When its on screen aka Mainscreen? Does it not give this error? Type mismatch is when parsing the wrong parameters to a function..

    I believe your attempted to a walk to a tile in which you cannot walk..
    I am Ggzz..
    Hackintosher

  3. #3
    Join Date
    Dec 2009
    Location
    R_GetPlayerLoc;
    Posts
    2,235
    Mentioned
    0 Post(s)
    Quoted
    14 Post(s)

    Default

    When its onscreen the code exits. BTW, the error is at Params[1] and sometimes at waitfuncex('tileonmswrap', params, ...)


    Edit: REsolved. Thanks dgby
    "Logic never changes, just the syntax" - Kyle Undefined?

    Remember, The Edit Button Is There For A Reason!!!

  4. #4
    Join Date
    Jan 2010
    Posts
    5,227
    Mentioned
    6 Post(s)
    Quoted
    60 Post(s)

    Default

    What was the solution?

  5. #5
    Join Date
    Jan 2008
    Location
    10° north of Hell
    Posts
    2,035
    Mentioned
    65 Post(s)
    Quoted
    164 Post(s)

    Default

    Quote Originally Posted by i luffs yeww View Post
    What was the solution?
    I think you said it first, Variant cant be a TTile.

    Dg's Small Procedures | IRC Quotes
    Thank Wishlah for my nice new avatar!
    Quote Originally Posted by IRC
    [22:12:05] <Dgby714> Im agnostic
    [22:12:36] <Blumblebee> :O ...you can read minds

  6. #6
    Join Date
    Dec 2009
    Location
    R_GetPlayerLoc;
    Posts
    2,235
    Mentioned
    0 Post(s)
    Quoted
    14 Post(s)

    Default

    Quote Originally Posted by Dgby714 View Post
    I think you said it first, Variant cant be a TTile.
    Yeah I was thinking about this since yesterday but I didn't know/where how to check what it supports.

    p.s: Your an inspiration
    "Logic never changes, just the syntax" - Kyle Undefined?

    Remember, The Edit Button Is There For A Reason!!!

  7. #7
    Join Date
    Jan 2010
    Posts
    5,227
    Mentioned
    6 Post(s)
    Quoted
    60 Post(s)

    Default

    Well that has to be a bug, right? Why couldn't a variant support a TTile? Shouldn't it support any type?

  8. #8
    Join Date
    Dec 2009
    Location
    R_GetPlayerLoc;
    Posts
    2,235
    Mentioned
    0 Post(s)
    Quoted
    14 Post(s)

    Default

    Quote Originally Posted by i luffs yeww View Post
    Well that has to be a bug, right? Why couldn't a variant support a TTile? Shouldn't it support any type?
    In my opinion it should but maybe PS is geared up like that ... Maybe PS doesn't support custom records as variants...
    "Logic never changes, just the syntax" - Kyle Undefined?

    Remember, The Edit Button Is There For A Reason!!!

  9. #9
    Join Date
    Aug 2009
    Location
    Nova Scotia, Canada
    Posts
    604
    Mentioned
    0 Post(s)
    Quoted
    56 Post(s)

    Default

    I believe only integers and strings are supported by variants in PS.
    Never ever approach a computer saying or even thinking "I will just do this quickly".

  10. #10
    Join Date
    Jan 2008
    Location
    10° north of Hell
    Posts
    2,035
    Mentioned
    65 Post(s)
    Quoted
    164 Post(s)

    Default

    Quote Originally Posted by Bixby Sayz View Post
    I believe only integers and strings are supported by variants in PS.
    All basic types.

    Dg's Small Procedures | IRC Quotes
    Thank Wishlah for my nice new avatar!
    Quote Originally Posted by IRC
    [22:12:05] <Dgby714> Im agnostic
    [22:12:36] <Blumblebee> :O ...you can read minds

  11. #11
    Join Date
    Jan 2010
    Posts
    5,227
    Mentioned
    6 Post(s)
    Quoted
    60 Post(s)

    Default

    Well all types use a basic type, so I don't see why this should be unsupported. :/ Unless we'd just have to make a different type that supported custom types or something? dunno.

  12. #12
    Join Date
    Feb 2007
    Posts
    849
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    You could just return a TIntegerArray;

    result.[0] and result.[1] for x and y respectively?
    ________________________________________
    14:19 < cycrosism> I wonder what she would have done without it
    14:19 < cycrosism> without me*
    Cycrosism is now an it.
    Quote Originally Posted by Dervish View Post
    /Facedesk.

  13. #13
    Join Date
    Jan 2010
    Posts
    5,227
    Mentioned
    6 Post(s)
    Quoted
    60 Post(s)

    Default

    Quote Originally Posted by HarryJames View Post
    You could just return a TIntegerArray;

    result.[0] and result.[1] for x and y respectively?
    It seems like that would work (dunno if there's more bugs in PS that I'm unaware of ), but it also seems silly that you can't use custom types.

  14. #14
    Join Date
    Dec 2009
    Location
    R_GetPlayerLoc;
    Posts
    2,235
    Mentioned
    0 Post(s)
    Quoted
    14 Post(s)

    Default

    This certainly should be a suggestion for newer PS version things...
    "Logic never changes, just the syntax" - Kyle Undefined?

    Remember, The Edit Button Is There For A Reason!!!

  15. #15
    Join Date
    Jan 2008
    Location
    10° north of Hell
    Posts
    2,035
    Mentioned
    65 Post(s)
    Quoted
    164 Post(s)

    Default

    Quote Originally Posted by HarryJames View Post
    You could just return a TIntegerArray;

    result.[0] and result.[1] for x and y respectively?
    Already done =P that was my suggestion.

    Quote Originally Posted by Yago View Post
    This certainly should be a suggestion for newer PS version things...
    Simba will not be using PS soon. We will be moving to Lape.

    Dg's Small Procedures | IRC Quotes
    Thank Wishlah for my nice new avatar!
    Quote Originally Posted by IRC
    [22:12:05] <Dgby714> Im agnostic
    [22:12:36] <Blumblebee> :O ...you can read minds

  16. #16
    Join Date
    Dec 2009
    Location
    R_GetPlayerLoc;
    Posts
    2,235
    Mentioned
    0 Post(s)
    Quoted
    14 Post(s)

    Default

    Quote Originally Posted by Dgby714 View Post
    Already done =P that was my suggestion.


    Simba will not be using PS soon. We will be moving to Lape.
    As long as there are more tuts ... I'm always open to learn
    "Logic never changes, just the syntax" - Kyle Undefined?

    Remember, The Edit Button Is There For A Reason!!!

  17. #17
    Join Date
    Feb 2007
    Posts
    849
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Wohoo, I now feel like i've made a decent contribution to the forum :3
    ________________________________________
    14:19 < cycrosism> I wonder what she would have done without it
    14:19 < cycrosism> without me*
    Cycrosism is now an it.
    Quote Originally Posted by Dervish View Post
    /Facedesk.

  18. #18
    Join Date
    Jan 2008
    Location
    10° north of Hell
    Posts
    2,035
    Mentioned
    65 Post(s)
    Quoted
    164 Post(s)

    Default

    Quote Originally Posted by HarryJames View Post
    Wohoo, I now feel like i've made a decent contribution to the forum :3
    Made me lol!

    Dg's Small Procedures | IRC Quotes
    Thank Wishlah for my nice new avatar!
    Quote Originally Posted by IRC
    [22:12:05] <Dgby714> Im agnostic
    [22:12:36] <Blumblebee> :O ...you can read minds

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •