SRL Archive - S.M.A.R.T.

Need Tut on parameters


BigRedJapan

2013-02-27 19:31:34

So i want to learn some stuff about SMART cuz no one wants to help! Can someone make a TUT about smart and how parameters and everything work!

Thanks Rule

King

2013-02-27 19:33:36

From: Rules of Joe
So i want to learn some stuff about SMART cuz no one wants to help! Can someone make a TUT about smart and how parameters and everything work!

Thanks Rule


Look around the different threads first, there are several explaining where the parameters are and what they do(;

BigRedJapan

2013-02-27 20:00:36

Iv just spent an hour looking for SMART Tuts

Neodymium

2013-02-27 20:04:22

Here are some threads I posted in:
http://villavu.com/forum/showthread.php?t=97228
http://villavu.com/forum/showthread.php?t=97215

BigRedJapan

2013-02-27 21:42:13

Thank you! <3

pija

2013-02-28 11:54:16

You don't need a tut on parameters, you need a tutorial on functions.
Arguments are variables that are passed to a function whenever it is called, to pass variables to a function you must place them within the brackets.
What the function or procedure does with this arguments is entirely dependant on the function declaration.
The parameters are simply the declaration of variables that will have the value of the passed arguments.
Some pascal syntax:
To define a procedure simply write:

procedure MyProcedure();
begin
// Code
end;

A procedure will simply execute when called.
To declare a function

function MyFunction():integer;
begin
//CODE
return:=x
end;

A function will execute when called and return a value when called, that value will depend on the function type, defined here as an integer.

If you wish for a function or procedure to use a variable or constant and do something with it then you must pass it as a parameter (unless it is a global variable).
You must declare what kind of arguments it will take, how many and in which order.
The variables that will have the values of the passed arguments are the parameters, You define them like this

function Multiply(x,y:integer):integer;
begin
result:= x*y[
end;/QUOTE]
This function declares the parameters as integers, if you pass anything else other than two integers, the compiler will throw an error.
When this function is called it will simply return "result" in whichever context you were calling the function. result will be equal to the product of the parameters of the function.

Those are just the basics, hope you find them useful. If you already knew all those things, maybe ask for something more specific.

King

2013-02-28 12:13:12

From: Neodymium
Here are some threads I posted in:
http://villavu.com/forum/showthread.php?t=97228
http://villavu.com/forum/showthread.php?t=97215


Was specifically thinking of your question threads<3

mcbain

2013-02-28 18:09:36

From: pija
You don't need a tut on parameters, you need a tutorial on functions.
Arguments are variables that are passed to a function whenever it is called, to pass variables to a function you must place them within the brackets.
What the function or procedure does with this arguments is entirely dependant on the function declaration.
The parameters are simply the declaration of variables that will have the value of the passed arguments.
Some pascal syntax:
To define a procedure simply write:

A procedure will simply execute when called.
To declare a function

A function will execute when called and return a value when called, that value will depend on the function type, defined here as an integer.

If you wish for a function or procedure to use a variable or constant and do something with it then you must pass it as a parameter (unless it is a global variable).
You must declare what kind of arguments it will take, how many and in which order.
The variables that will have the values of the passed arguments are the parameters, You define them like this

This function declares the parameters as integers, if you pass anything else other than two integers, the compiler will throw an error.
When this function is called it will simply return "result" in whichever context you were calling the function. result will be equal to the product of the parameters of the function.

Those are just the basics, hope you find them useful. If you already knew all those things, maybe ask for something more specific.


He means a tutorial on SMART parameters, probably trying to figure out how to load oldschool rs with SMART.

BigRedJapan

2013-02-28 20:00:53

if its not in iframe id what id should I be looking for?

Neodymium

2013-02-28 23:01:04

You don't need to look for anything.
From: Neodymium
Change the GetSmartParams (or whatever it is) function to set the values yourself.

SetLength(Params, 2);
Params[0] := 'http://__________.runescape.com/';
Params[1] := ''; // what is after the last "/" in the url
Go to "http://oldschool.runescape.com/slu" and just find a world (choose the best world would work).
Look at the url and separate it into each parameter, as shown above.

The EOC url looks something like "http://world1.runescape.com/,123abcd463", but as you can tell, there is no comma in the url for old school.
Make sure you remove the "," that is concatenated to the Params[1] when SMART is being spawned, or else it will not work.
Also, reduce the height (the second integer) by 50 pixels, should be 503 I think.

I think I'm going to have to create a Hints thread, eh?

Rum0ur

2013-03-01 09:17:31

From: Neodymium
You don't need to look for anything.

I think I'm going to have to create a Hints thread, eh?

You cant even begin to understand how nice this would be haha. I've been trying for the past 2 days now to teach myself to absolutely no avail. I just dont feel like im getting anywhere.

Eejit

2013-03-02 18:28:44

From: Neodymium
You don't need to look for anything.

I think I'm going to have to create a Hints thread, eh?



Thanks for posting this! I've been trying to figure this out for a while now, finally got it working.