Results 1 to 16 of 16

Thread: Internal error

  1. #1
    Join Date
    Sep 2010
    Posts
    5,762
    Mentioned
    136 Post(s)
    Quoted
    2739 Post(s)

    Default Internal error

    I am currently making a muilti-auto fighter for project 2006, and I'm getting a internal error at this part of the script:

    Simba Code:
    Procedure SetKill;
    Begin
      Case LowerCase(MonsterKill) Of
        'globlin':
         Color_Monster = 5
         Hue_Monster = 0
         Sat_Monster = 0
         Tol_Monster = 0
         Uptext_1 = 'Attack Go'
         Uptext_2 = 'ttack Gob'
         Uptext_3 = 'ack Globin';
         'custom':
         Color_Monster = C_COLOR
         Hue_Monster = C_HUE
         Sat_Monster = C_SAT
         Tol_Monster = C_TOL
         Uptext_1 = C_UPTEXT_1
         Uptext_2 = C_UPTEXT_2
         Uptext_3 = C_UPTEXT_3;
      End;
    End;

    Code:
    [Error] C:\Simba\Scripts\Project2006autofighter.simba(74:6): Internal error (20) at line 73
    Compiling failed.
    Line 20:
    Simba Code:
    Hue_Monster = 0


    I think im using cases wrong.. but IDK, if you need to see whole script let me know

  2. #2
    Join Date
    May 2007
    Location
    England/Liverpool
    Posts
    1,004
    Mentioned
    9 Post(s)
    Quoted
    106 Post(s)

    Default

    you need to add a begin and end; when calling more than one function/procedure or setting values
    in case statements


    Simba Code:
    Procedure SetKill;
    Begin
      Case LowerCase(MonsterKill) Of
        'globlin':
    begin
         Color_Monster = 5
         Hue_Monster = 0
         Sat_Monster = 0
         Tol_Monster = 0
         Uptext_1 = 'Attack Go'
         Uptext_2 = 'ttack Gob'
         Uptext_3 = 'ack Globin';
    end;
         'custom':
    begin
         Color_Monster = C_COLOR
         Hue_Monster = C_HUE
         Sat_Monster = C_SAT
         Tol_Monster = C_TOL
         Uptext_1 = C_UPTEXT_1
         Uptext_2 = C_UPTEXT_2
         Uptext_3 = C_UPTEXT_3;
         end;
      End;
    End;

    major edits sorry about that.
    Last edited by Mark; 02-06-2013 at 09:39 PM.

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

    Default

    Simba Code:
    Procedure SetKill;
    Begin
      Case LowerCase(MonsterKill) Of
        'globlin':
        begin
          Color_Monster := 5;
          Hue_Monster := 0;
          Sat_Monster := 0;
          Tol_Monster := 0;
          Uptext_1 := 'Attack Go';
          Uptext_2 := 'ttack Gob';
          Uptext_3 := 'ack Globin';
        end;
        'custom':
        begin
          Color_Monster := C_COLOR;
          Hue_Monster := C_HUE;
          Sat_Monster := C_SAT;
          Tol_Monster := C_TOL;
          Uptext_1 := C_UPTEXT_1;
          Uptext_2 := C_UPTEXT_2;
          Uptext_3 := C_UPTEXT_3;
        End;
      End;
    End;
    Last edited by i luffs yeww; 02-06-2013 at 09:47 PM.

  4. #4
    Join Date
    Sep 2010
    Posts
    5,762
    Mentioned
    136 Post(s)
    Quoted
    2739 Post(s)

    Default

    Quote Originally Posted by CRU1Z1N View Post
    you need to add a begin and end; when calling more than one function/procedure or setting values
    in case statements


    Simba Code:
    Procedure SetKill;
    Begin
      Case LowerCase(MonsterKill) Of
        'globlin':
    begin
         Color_Monster = 5
         Hue_Monster = 0
         Sat_Monster = 0
         Tol_Monster = 0
         Uptext_1 = 'Attack Go'
         Uptext_2 = 'ttack Gob'
         Uptext_3 = 'ack Globin';
    end;
         'custom':
    begin
         Color_Monster = C_COLOR
         Hue_Monster = C_HUE
         Sat_Monster = C_SAT
         Tol_Monster = C_TOL
         Uptext_1 = C_UPTEXT_1
         Uptext_2 = C_UPTEXT_2
         Uptext_3 = C_UPTEXT_3;
         end;
      End;
    End;

    major edits sorry about that.
    Still getting the same error :s

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

    Default

    Quote Originally Posted by rjj95 View Post
    Still getting the same error :s
    Semicolons.

    Also, your first case says 'globlin.' shouldn't it be 'goblin?'

  6. #6
    Join Date
    May 2007
    Location
    England/Liverpool
    Posts
    1,004
    Mentioned
    9 Post(s)
    Quoted
    106 Post(s)

    Default

    yeah i see your missing semicolons

    Color_Monster = C_COLOR

    should be
    Color_Monster:= C_COLOR

    Edit:ninja also didnt notice that Globlin :d nice catch
    Last edited by Mark; 02-06-2013 at 09:44 PM.

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

    Default

    Quote Originally Posted by CRU1Z1N View Post
    yeah i see your missing semicolons

    Color_Monster = C_COLOR

    should be
    Color_Monster:= C_COLOR

    Edit:ninja also didnt notice that Globlin :d nice catch
    They should also all be assignments, actually.

    EDIT: This is actually the reason he's getting the internal error. I was using Lape so my errors were different.
    Last edited by i luffs yeww; 02-06-2013 at 09:49 PM.

  8. #8
    Join Date
    Sep 2010
    Posts
    5,762
    Mentioned
    136 Post(s)
    Quoted
    2739 Post(s)

    Default

    Just added semi colons,
    Simba Code:
    Procedure SetKill;
    Begin
      Case LowerCase(MonsterKill) Of
        'goblin':
        Begin
          Color_Monster = 5015139;
          Hue_Monster = 0.07;
          Sat_Monster = 0.15;
          Tol_Monster = 5;
          Uptext_1 = 'Attack Go';
          Uptext_2 = 'ttack Gob';
          Uptext_3 = 'ack Globin';
        end;
        'custom':
        Begin
          Color_Monster = C_COLOR;
          Hue_Monster = C_HUE;
          Sat_Monster = C_SAT;
          Tol_Monster = C_TOL;
          Uptext_1 = C_UPTEXT_1;
          Uptext_2 = C_UPTEXT_2;
          Uptext_3 = C_UPTEXT_3;
        End;
      End;
    End;

    but the same result:

    Code:
    [Error] C:\Simba\Scripts\Project2006autofighter.simba(95:30): Internal error (20) at line 94
    Compiling failed.

  9. #9
    Join Date
    Jun 2012
    Posts
    4,867
    Mentioned
    74 Post(s)
    Quoted
    1663 Post(s)

    Default

    They mean colons, like this: :
    Simba Code:
    Procedure SetKill;
    Begin
      Case LowerCase(MonsterKill) Of
        'goblin':
        Begin
          Color_Monster := 5015139;
          Hue_Monster := 0.07;
          Sat_Monster := 0.15;
          Tol_Monster := 5;
          Uptext_1 := 'Attack Go';
          Uptext_2 := 'ttack Gob';
          Uptext_3 := 'ack Globin';
        end;
        'custom':
        Begin
          Color_Monster := C_COLOR;
          Hue_Monster := C_HUE;
          Sat_Monster := C_SAT;
          Tol_Monster := C_TOL;
          Uptext_1 := C_UPTEXT_1;
          Uptext_2 := C_UPTEXT_2;
          Uptext_3 := C_UPTEXT_3;
        End;
      End;
    End;

  10. #10
    Join Date
    Sep 2007
    Location
    Australia, NSW
    Posts
    934
    Mentioned
    6 Post(s)
    Quoted
    145 Post(s)

    Default

    I had this issue a few days ago - and I only just fixed it now after reading this post! I was thinking way beyond the problem..

    Some SRL Member I am

    INACTIVE
    How-to: Make S.M.A.R.T. less laggy

    Sell me your Maple Shieldbows (u)! Up to 95gp ea!

    My Scripts:
    Ivy Chopper Ultra [RS3] | Fantastic Fletcher [RS3]
    99 x78 | 99 x10 | 99 x2 | 99 x12


    Use the REPORT tags when posting progress reports to make life easier (:
    [REPORT]Put progress report in here![/REPORT]

    Super Savvy Smither V1.06Cool Classy Cooker V1.02 [EoC]

  11. #11
    Join Date
    Sep 2010
    Posts
    5,762
    Mentioned
    136 Post(s)
    Quoted
    2739 Post(s)

    Default

    Now I have a different Error:

    Code:
    Type mismatch
    At this line:

    Simba Code:
    Hue_Monster := 0.07;

    I'm guessing that I can't use name number 0.07? (decimals?)

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

    Default

    Quote Originally Posted by rjj95 View Post
    Now I have a different Error:

    Code:
    Type mismatch
    At this line:

    Simba Code:
    Hue_Monster := 0.07;

    I'm guessing that I can't use name number 0.07? (decimals?)
    Hue_Monster needs to be of type Extended.

  13. #13
    Join Date
    Sep 2010
    Posts
    5,762
    Mentioned
    136 Post(s)
    Quoted
    2739 Post(s)

    Default

    Quote Originally Posted by i luffs yeww View Post
    Hue_Monster needs to be of type Extended.
    not sure how to declare a type sec I think I know how ill come back if I get an error

    EDIT:

    So I got:

    Simba Code:
    Type
       Hue_Monster,Sat_Monster:Integer;

    but i get the error:

    Code:
    [Error] C:\Simba\Scripts\Project2006autofighter.simba(19:15): is ('=') expected at line 18
    Compiling failed.
    So I'm guessing I'll have to declare it inside of the case?

  14. #14
    Join Date
    Jun 2012
    Posts
    4,867
    Mentioned
    74 Post(s)
    Quoted
    1663 Post(s)

    Default

    An integer is a whole number, an extended is a number that can have decimals. I recommend you read this tutorial, it's very good : http://villavu.com/forum/showthread.php?p=601951

    Simba Code:
    var
    Hue_Monster,Sat_Monster:Extended;

  15. #15
    Join Date
    Sep 2010
    Posts
    5,762
    Mentioned
    136 Post(s)
    Quoted
    2739 Post(s)

    Default

    Quote Originally Posted by BMWxi View Post
    Simba Code:
    var
    Hue_Monster,Sat_Monster:Extended;
    ty no errors!

    This script is going to be completly NOOB freindly

  16. #16
    Join Date
    May 2007
    Location
    England/Liverpool
    Posts
    1,004
    Mentioned
    9 Post(s)
    Quoted
    106 Post(s)

    Default

    creating a type

    Type MonsterCols = record
    Hue_Monster,Sat_Monster:Integer;
    end;

    then you need to create your new type you declare this in your variables like you would create and integer

    procedure someproc;
    var
    MonsterColArray:MonsterCols;//declare your new type here or in your global variables
    begin
    case wateva of
    'boblin':
    begin
    MonsterColArray.Hue_Monster:= 324;//whateva the value is
    MonsterColArray.Sat_Monster:= 324;
    end;
    end;

    edit: something wrong with my browser keeps messing up my posts
    Last edited by Mark; 02-06-2013 at 10:10 PM.

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
  •