Edgeeawaits
2012-04-18 21:13:00
Hey, im working on completeing my first green dragon script with wildy wall and everything, problem is I keep getting a "Type mismatch" any help? I can give you a copy of this script when it ccomes out.
Awkwardsaw
2012-04-18 21:15:16
Post the code that gets the error. We can't help if you don't give much information :p
Brandon
2012-04-18 21:16:03
You cannot assign a value of a different type to another type.. Bool cannot be assign an int.. int cannot be assigned a string.. etc.. There are functions for conversions such as
StrToIntDef, IntToStr, Point cannot be assigned a TPA.. etc..
Edgeeawaits
2012-04-18 21:24:56
Function PickUpDragonbones: Boolean;
Var
X, Y: Integer;
begin
If Dbones = False then Exit;
If Dbones = True then
begin
FindNormalRandoms;
If FindObjOnScreen(['ake', 'Take', 'ke', 'ak'], ['ragon bones'],14409957,1950,577,False,0.38,0.55) Then
Begin
Wait(500);
writeln('You have found some Dragon Bones!');
While IsMoving do
Wait(50);
FindNormalRandoms
Wait(RandomRange(300,400));
Inc(Bones);
End;
end;
end;
Edgeeawaits
2012-04-18 21:25:57
I'm just starting, so im probably messing something up :p
sahibjs
2012-04-18 21:33:48
At which line is the type mismatch? Also, try to put your code in the little code bar thingamjaigs.
Edgeeawaits
2012-04-18 21:38:08
Mismatch is at line 1209 so the line that says If Dbones = False then Exit;
I've honestly got no idea what the codebar is, im so new to this, and appreciate the help very much :)
Brandon
2012-04-18 21:39:06
What type is DBones? A string?
sahibjs
2012-04-18 21:40:06
what you do is put
and then put your script in between those two.
when you're all done, put the same thing again but this time put a [/CODE
make sure you don't forget the ending bracket, I didn't put it in cause then the code for the code wouldn't show haha
it looks like this:
[CODE] ello
Edgeeawaits
2012-04-18 21:41:30
It could be, tbh i don't even know.. thats how new i am to this, i basically just looked off other scripts to try to get mine to work :/ but that is the only problem i've gotten with this script so far..
Edgeeawaits
2012-04-18 21:59:27
The problem with this might be that i copied like some parts from other scripts, so that might be giving me problems, maybe i should start with something easier? Although even then, i don't know how to do stufff myself, ill just look and use what other scripts have on them :/
Bobby Boo
2012-04-18 22:19:50
From: Edgeeawaits
The problem with this might be that i copied like some parts from other scripts, so that might be giving me problems, maybe i should start with something easier? Although even then, i don't know how to do stufff myself, ill just look and use what other scripts have on them :/
that's still pretty much plagiarism (Removed by BraK)
Edgeeawaits
2012-04-18 22:22:37
From: Bobby Boo
that's still pretty much plagiarism
That may be so, but its not copywrite? and even if it is, i honestly dont care.. ive talked to the people whos scripts im using so they're fine with it.
I'm just new to this k? If i copy something, im just learning..
Edgeeawaits
2012-04-18 22:25:44
From: Bobby Boo
that's still pretty much plagiarism
Clearly it isn't you cant copy something that isn't copywrite, even if it is, they're alright with it and I have permission to use it so its nbd. I'm just learning, ill not copy stuff eventually..
If he has the original script writers permission then he is allowed to modify it.
Benny
2012-04-29 11:05:39
Look forward to this.. I was gonna start this soon >.<
lostprophetsown
2012-05-04 20:19:18
Sounds like you're having trouble with some of the basics, such as declaring the correct variables, etc. I personally think you should take smaller steps and try making a basic script first, such as a powerchopper/miner, to learn basic functions, then slowly proceed with your coding. It'll take far longer to make a script copying and pasting bits if you're not even sure what they do, as well as this, you'll have many bugs and errors, the script probably wont even work and you'll feel like its a waste. At least if you make the code (mostly) then you'll feel like you've achieved more and you'll also know basic - intermediate coding.
Just my opinion anyway :P Good luck with whatever you decide to do.
kevin33
2012-05-04 20:24:46
From: BraK
If he has the original script writers permission then he is allowed to modify it.
Can he not modify it for his script as a private script (not released to public) and even if he did, we would have no idea?
@OP you need to answer ggzz's question in order for us to be able to help you :)