SRL Archive - Help

Whenever I run a script this pop's up in debug....


catbat78

2012-01-29 17:45:52

So, just recently after I updated my extensions for Simba this started popping up whenever I try to run a script on either my computers…:
[Error] (36:32): Type mismatch at line 35
Compiling failed.


And line 35 says:
LampSkill := 'Fishing';


Sorry if this has already been posted, just redirect me to the thread if it has.. ::p

Supertrent1

2012-01-29 17:49:31

From: catbat78
So, just recently after I updated my extensions for Simba this started popping up whenever I try to run a script on either my computers…:

And line 35 says:

Sorry if this has already been posted, just redirect me to the thread if it has.. ::p


Can we have a little bit more of the script. Anyways try this
LampSkill := ('Fishing');

Nebula

2012-01-29 18:05:19

Skill_fishing I believe would be the fix.
Edit:
Yes, it is. change that line to:

LampSkill := Skill_Fishing;

catbat78

2012-01-29 18:13:32

Yah the parenthesis didn't work. :(

Oh, and by the way I'm using Heavy Rodder by Flight but it's been doing the same thing on other scripts too.

Nebula

2012-01-29 18:15:46

Read what I just said,

LampSkill := Skill_Fishing;

catbat78

2012-01-29 18:19:20

Oh sorry didn't see your post; didn't refresh the page.. :p

Thanks for the fix Nebula!

Kyle Undefined

2012-01-29 18:20:06

LampSkill := ['Fishing'];

That's how you fix it, LampSkill is a TStringArray, which it why the brackets are needed.

catbat78

2012-01-29 18:23:08

Thanks for the help everyone, you can lock the thread now.. :)

m3gaman3g3nd

2012-01-29 18:24:07

Also A type usually means type of variable so when you see type mismatch its usually either due to lets say an integer vs a tpoint…. so if you put a Tpoint in a perameter when you require an integer you will get type mismatch… further more now that i say this, if want to use a tpoint as an integer you will simply put tpoint.x … tpoint.y … get it?