SRL Archive - MSI Archives

Trying to add Rimmington Yews, type mismatch


marpis

2010-06-30 11:28:30


SCRIPT_RIMMY_YEWS:
with result do
begin
scriptName := 'Rimmington Yews';
scriptTools := [TOOL_HATCHET];

skillName := 'Woodcutting';
skillConstant := SKILL_WOODCUTTING;

objectConstants := [ OBJ_TREE_YEW ];
objectExperiences := [ 175 ];

itemNames := [ 'Yew logs' ];
itemConstants := [ ITEM_LOGS_YEW ];

doesBank := True;

pathRefTo := [Point(3013, 3356),
Point(3007, 3350), Point(3007, 3332), Point(3006, 3324),
Point(3006, 3311), Point(3005, 3298), Point(2999, 3289),
Point(2994, 3283), Point(2984, 3277), Point(2975, 3270),
Point(2971, 3260), Point(2963, 3253), Point(2956, 3244),
Point(2946, 3239), Point(2940, 3230), Point(2934, 3231)
];

pathRefFrom := InvertTPA(pathRefTo);
end;


[Error] C:\Users\.../srl/msi/Scripts.scar(87:44): Type mismatch at line 86

This is the line that causes the error:

pathRefTo := [Point(3013, 3356),

i luffs yeww

2010-06-30 16:03:10

Tile(3013, 3356), ?

Method

2010-06-30 16:06:35

From: i luffs yeww
Tile(3013, 3356), ?


It's a TPointArray, not a TTileArray.

i luffs yeww

2010-06-30 16:12:59

:p alright.

Sir R. M8gic1an

2010-06-30 17:52:35

Simba, scar?

Only difference between that and the other one is the white space.. which *should* be ignored anyways.. …?

~RM

i luffs yeww

2010-06-30 18:01:56

The whitespace shouldn't matter, as this is a type mismatch?

Sir R. M8gic1an

2010-06-30 18:03:24

From: i luffs yeww
The whitespace shouldn't matter, as this is a type mismatch?


Well, do you see any type mismatch? Cus I don't.

~RM

Coh3n

2010-06-30 18:22:31

Comment out the InvertTPA line. :confused:

Gu3st...

2010-06-30 18:58:02

I see no reason to why this should result in an error :huh:

Coh3n

2010-06-30 18:59:02

http://villavu.com/forum/showthread.php?t=57682

E: Yeahhh, InvertTPA is a procedure, not a function.

i luffs yeww

2010-06-30 19:43:16

So currently you should change it to


pathRefTo := [Point(3013, 3356),
Point(3007, 3350), Point(3007, 3332), Point(3006, 3324),
Point(3006, 3311), Point(3005, 3298), Point(2999, 3289),
Point(2994, 3283), Point(2984, 3277), Point(2975, 3270),
Point(2971, 3260), Point(2963, 3253), Point(2956, 3244),
Point(2946, 3239), Point(2940, 3230), Point(2934, 3231)
];

InvertTPA(pathRefTo);
pathRefFrom := pathRefTo;

Gu3st...

2010-06-30 19:57:26

pathRefTo   := [Point(3013, 3356),
Point(3007, 3350), Point(3007, 3332), Point(3006, 3324),
Point(3006, 3311), Point(3005, 3298), Point(2999, 3289),
Point(2994, 3283), Point(2984, 3277), Point(2975, 3270),
Point(2971, 3260), Point(2963, 3253), Point(2956, 3244),
Point(2946, 3239), Point(2940, 3230), Point(2934, 3231)
];

pathRefFrom := pathRefTo;
InvertTPA(pathRefFrom);

Sir R. M8gic1an

2010-06-30 20:10:22

problem solved, gd gd :)

~RM

Coh3n

2010-07-01 08:18:45

^Not exactly. It wouldn't work because InvertTPA doesn't copy the array, it just changes it. So evertime PathRefTo was called, it would be inverted.

Sir R. M8gic1an

2010-07-01 13:44:16

From: Coh3n
^Not exactly. It wouldn't work because InvertTPA doesn't copy the array, it just changes it. So evertime PathRefTo was called, it would be inverted.


I think you're reading it wrong, cohen..



PathRefTo := [ Point(0,0), Point(1,1), Point(2,2) ];

PathRefFrom := PathRefTo;

InverTPA(PathRefFrom); //Only this one is affected.


~RM

Coh3n

2010-07-01 13:47:29

From: Rasta Magician
I think you're reading it wrong, cohen..



PathRefTo := [ Point(0,0), Point(1,1), Point(2,2) ];

PathRefFrom := PathRefTo;

InverTPA(PathRefFrom); //Only this one is affected.


~RM

Oh haha, yeah I didn't see Zyt3x's post. I only saw i luffs yeww's.

Sir R. M8gic1an

2010-07-02 06:36:17

Has anyone committed this yet?

~RM

Gu3st...

2010-07-02 06:58:47

Nope :P

Coh3n

2010-07-02 07:53:03

From: Rasta Magician
Has anyone committed this yet?

~RM

Btw, you can't just add the record and it'll work. There's a little more to it. Also, I'm going to have to talk to you about this when I can start working on it, but some of the updates to the core I'll be making will make it more complicated to add scripts. I would like to work it out so it's like now, but I'm not sure if that'll be possible.

Coh3n

2010-07-07 15:28:53

This doesn't seem to be working. I'm trying to add Varrock east oaks, and using InvertTPA is inverting the original. I know it shouldn't, but it is.