Results 1 to 6 of 6

Thread: Runtime Error, Type Mismatch?

  1. #1
    Join Date
    May 2008
    Posts
    1,345
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Runtime Error, Type Mismatch?

    Can I get some help with this?

    This line:

    SCAR Code:
    If Lowercase(Team) = 'guthix' Then

    Throws me this error every time it's not in the area it needs to be to decide what a different variable is.

    SCAR Code:
    [Runtime Error] : Exception: Type Mismatch in line 315 in script C:\Documents and Settings\Desktop\SCAR 3.15\Scripts\Soul Wars.scar

    Team is a constant and is declared as a string.

    It's also giving me this, which confuses me:

    SCAR Code:
    Line 317: [Hint] (21132:1): Variable '' never used in script C:\Documents and Settings\Desktop\SCAR 3.15\Scripts\Soul Wars.scar

    I have no idea why I'm getting this :/.

    ~Sandstorm

  2. #2
    Join Date
    Mar 2007
    Posts
    4,810
    Mentioned
    3 Post(s)
    Quoted
    3 Post(s)

    Default

    Try changing Team to a Variable.

  3. #3
    Join Date
    May 2008
    Posts
    1,345
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I fixed the error, at least, I don't get it anymore. But now one of my While...Do loops isn't executing. It just continually checks the parameters over and over. Any ideas?

    Here's my code for the AFK spot:

    SCAR Code:
    While OutOfGame and not InAWaitingRoom and not T[0] and InAfkSpot(TeamInteger) Do
        Begin
          WriteLn('In AFK Spot!');
          DoAntiBans;
          Wait(500);
          T[0] := DidIDie = TeamInteger;
        End;

    ~Sandstorm

  4. #4
    Join Date
    Jul 2007
    Location
    Norway.
    Posts
    1,938
    Mentioned
    3 Post(s)
    Quoted
    0 Post(s)

    Default

    Paranthesis.

    SCAR Code:
    While OutOfGame and (not InAWaitingRoom) and (not T[0]) and InAfkSpot(TeamInteger) Do
        Begin
          WriteLn('In AFK Spot!');
          DoAntiBans;
          Wait(500);
          T[0] := (DidIDie = TeamInteger);
        End;

  5. #5
    Join Date
    May 2008
    Posts
    1,345
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Seriously? Wow, rofl. Thanks a lot!

    Nope, that doesn't work, .

    ~Sandstorm

  6. #6
    Join Date
    Mar 2007
    Posts
    4,810
    Mentioned
    3 Post(s)
    Quoted
    3 Post(s)

    Default

    Post or PM the whole script please

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [Runtime Error] Type Mismatch - what is it?
    By Nose Smasher in forum OSR Help
    Replies: 3
    Last Post: 02-27-2008, 06:21 PM
  2. type mismatch error?
    By RudeBoiAlex in forum OSR Help
    Replies: 2
    Last Post: 10-28-2007, 10:17 PM
  3. Type Mismatch error
    By !bezo! in forum OSR Help
    Replies: 3
    Last Post: 08-26-2007, 03:00 PM
  4. Type Mismatch error
    By RaptorBlaze in forum OSR Help
    Replies: 2
    Last Post: 07-15-2007, 07:00 AM
  5. Type mismatch error...
    By Hobbit in forum OSR Help
    Replies: 8
    Last Post: 02-13-2007, 04:45 AM

Posting Permissions

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