View Full Version : Type Mismatch in script...
Jason2gs
02-23-2007, 01:32 AM
if(FindColorSpiral(x, y, TreeColor1, 0, 0, 600, 600))or
(FindColorSpiral(x, y, TreeColor2, 0, 0, 600, 600))then
I keep getting that error here. Please help?
Thanks,
Mike.
Boreas
02-23-2007, 02:33 AM
Treecolor is declared as an integer?
Jason2gs
02-23-2007, 02:37 AM
Integer? I put it as a constant.
Boreas
02-23-2007, 02:40 AM
Hmm post more of script?
Jason2gs
02-23-2007, 03:02 AM
Alright, just a sec.
Jason2gs
02-23-2007, 03:09 AM
procedure TreeFinderChopper;
begin
if(FindColor(x, y, Treecolor1, 0, 0, 600, 600))or
FindColor(x, y, Treecolor2, 0, 0, 600, 600)then
begin
MMouse(x, y, 2, 2);
if(IsUpText(Treename))then
Mouse(x, y, 0, 0, True);
wait(10000 + Random (2000));
end;
end;
Boreas
02-23-2007, 03:16 AM
lemme see your consts section
Jason2gs
02-23-2007, 03:21 AM
Alrighty...
//-----Fill these out-----//
const
Loads = '3'; // Loads of logs to do before logging out
Treename = 'Tree'; // Name of the tree you wish to chop.
TreeColor1 = '000000'; // First tree color to look for.
TreeColor2 = '000000'; // Second tree color to look for.
//------------------------//
Boreas
02-23-2007, 03:25 AM
Yea that's what I thought. Take off the quotes for the numbers.
const
String1 = 'this string has quotes';
Integer1 = 1337;
String2 = 'the integer above has no quotes';
Jason2gs
02-23-2007, 03:26 AM
Ahhh, thanks :)
That's why you're an SRL member, and I'm an RU :)
Jason2gs
02-23-2007, 03:34 AM
Before you leave. I've got another question.
until(Loadsoflogs = Loads)
Do I have that set up right? I want the Loads of logs to equal the number of loads the user sets.
Boreas
02-23-2007, 03:45 AM
Ahhh, thanks :)
That's why you're an SRL member, and I'm an RU :)
Np :P Get Drigers tutorial.exe
Before you leave. I've got another question.
until(Loadsoflogs = Loads)
Do I have that set up right? I want the Loads of logs to equal the number of loads the user sets.
Yup. Have Loads=10; with no quotes, and LoadsOfLogs:=LoadsOfLogs+1; at the banking/dropping.
Jason2gs
02-23-2007, 03:52 AM
No quotes? Kk...
Did that, and I'm still getting:
Unknown identifier 'Loadsoflogs' in script
=/
I can't see how though... I took away the quotes from "Loads = 3;" and I have Loadsoflogs set as a var in the dropping procedure. I aleady did "Loadsoflogs := Loads + 1"...
You probably need to see my whole script, right?
Boreas
02-23-2007, 03:59 AM
You probably need LoadsOfLogs to be a global var.
var LoadsOfLogs:integer;
put that below the consts section and above the procedures/functions
Jason2gs
02-23-2007, 04:04 AM
Alright, thanks :)
Lemme try it...
IT WORKS!!
Thanks B ;)
It's Version 1.0 of my PowerChopper :)
I might add multi-player this time, but I'll probably save that, as well as a prog report, till V2. After that (with the bug fixes along the way) I'm gonna try my luck at adding a form... Then maybe a banker... I might even add in a trip to bob's axes to get a broken axe fixed. If it's around lumby, that is. I'll probably have to learn some RW though. I hate learning stuff like that...
Anyways, gotta go. Thanks for all your help, mate.
Btw, your BlackList Tut looks nice. I can't wait till you finish it ;)
Thanks,
Mike.
Smartzkid
02-23-2007, 01:49 PM
:p wow it looks like you're almost ready to release your first [good] script!
=D I've been working on a powerchopper since you came here, but you're still releasing first :D
Anyways, good luck *grumbles* and i hope your computer crashes ** haha jk
mage of begu
02-23-2007, 02:13 PM
The procedure looks pretty good...good luck..!
Jason2gs
02-23-2007, 04:58 PM
:p wow it looks like you're almost ready to release your first [good] script!
=D I've been working on a powerchopper since you came here, but you're still releasing first :D
Anyways, good luck *grumbles* and i hope your computer crashes ** haha jk
It's not anywhere near what your's is gonna be.
I still have to add MultiPlayer (decided to add it in V1.0).
If you're chopping around lumby, I think I'll make it:
1) Walk back if you die.
and
2) Walk to bob's axes and get your axe fixed (if it's free to fix).
Powered by vBulletin® Version 4.2.1 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.