SRL Archive - Help

Odd Error


Yago

2011-04-17 18:01:01

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/

Brandon

2011-04-17 18:18:20

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..

Yago

2011-04-17 18:20:44

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


Edit: REsolved. Thanks dgby

i luffs yeww

2011-04-17 21:00:58

What was the solution? :)

Dgby714

2011-04-17 21:16:27

From: i luffs yeww
What was the solution? :)


I think you said it first, Variant cant be a TTile.

Yago

2011-04-17 21:33:03

From: Dgby714
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 :p

i luffs yeww

2011-04-17 21:39:05

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

Yago

2011-04-17 21:41:07

From: i luffs yeww
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…

Bixby Sayz

2011-04-17 21:45:50

I believe only integers and strings are supported by variants in PS.

Dgby714

2011-04-18 00:04:18

From: Bixby Sayz
I believe only integers and strings are supported by variants in PS.


All basic types.

i luffs yeww

2011-04-18 01:15:47

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.

HarryJames

2011-04-18 06:33:38

You could just return a TIntegerArray;

result.[0] and result.[1] for x and y respectively?

i luffs yeww

2011-04-18 06:54:45

From: HarryJames
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 :p), but it also seems silly that you can't use custom types.

Yago

2011-04-18 12:25:46

This certainly should be a suggestion for newer PS version things…

Dgby714

2011-04-18 14:34:18

From: HarryJames
You could just return a TIntegerArray;

result.[0] and result.[1] for x and y respectively?

Already done =P that was my suggestion.

From: Yago
This certainly should be a suggestion for newer PS version things…

Simba will not be using PS soon. We will be moving to Lape.

Yago

2011-04-18 14:36:05

From: Dgby714
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 :)

HarryJames

2011-04-18 15:29:33

Wohoo, I now feel like i've made a decent contribution to the forum :3

Dgby714

2011-04-18 16:42:06

From: HarryJames
Wohoo, I now feel like i've made a decent contribution to the forum :3


Made me lol!