BullyWiiHacks
Welcome dear guest! Very Happy

To start posting and being part of the BWH community, you simply need to register an account or log into an existing one.

If you do not wish to register at all, that's fine but there will be more advertisements. :/

You can probably see and download most content provided for regular members even without an account.

Your contributions will be greatly appreciated though, give it a shot and register today! thumbsup

Join the forum, it's quick and easy

BullyWiiHacks
Welcome dear guest! Very Happy

To start posting and being part of the BWH community, you simply need to register an account or log into an existing one.

If you do not wish to register at all, that's fine but there will be more advertisements. :/

You can probably see and download most content provided for regular members even without an account.

Your contributions will be greatly appreciated though, give it a shot and register today! thumbsup
BullyWiiHacks
Would you like to react to this message? Create an account in a few clicks or log in to continue.
BullyWiiHacks

Gaming, Modding & Programming

Important reminders:

- Click *HERE* for advanced forum search or check out the text field below on the front page for Google before posting
- NO support via private message (use the forum)
- Write meaningful topic titles
Site Translation
Latest topics
» Dropped Out of College to Pursue Web Dev and Life Pursuits in General
Functions Empty5/16/2024, 8:25 am by Bully@WiiPlaza

» Bully Made It Into a BIG Video 400K Views
Functions Empty4/7/2024, 6:58 am by Bully@WiiPlaza

» Wii Play Tanks
Functions Empty3/24/2024, 2:46 pm by helpmeout

» [Bypass Paywalls] (Global) @magnolia1234 - GitLab
Functions Empty3/18/2024, 3:55 am by Seth@WiiPlaza

» [Download] Mary Shelley's Frankenhole
Functions Empty3/16/2024, 8:29 am by Seth@WiiPlaza

» Completely Custom Modded Controllers (Undetectable)
Functions Empty3/5/2024, 1:55 pm by Shadow@BWH

» (Zombies) Drink perks code?
Functions Empty3/5/2024, 1:24 pm by Shadow@BWH

» Die Rückkehr zu STEAM und WARFACE
Functions Empty3/2/2024, 3:54 am by Seth@WiiPlaza

» First person hand model change?
Functions Empty2/28/2024, 4:53 am by Ad3lamac611

» {RELEASE} Field Raider Firefox v1.72 by Seth@WiiPlaza
Functions Empty2/21/2024, 8:52 am by naxil

Search
 
 

Display results as :
 


Rechercher Advanced Search

May 2024
MonTueWedThuFriSatSun
  12345
6789101112
13141516171819
20212223242526
2728293031  

Calendar Calendar

Country Statistics
Free counters!

You are not connected. Please login or register

Functions

Go down  Message [Page 1 of 1]

1Functions Empty Functions 8/31/2014, 11:29 am

Bully@WiiPlaza

Bully@WiiPlaza
 
 

Functions have names and possibly parameters. Parameters are variables that are given the function if it usually couldn't access them within their body.

When functions are called, their bodies get executed. They can return a result or not. If a result should be returned, the keyword
Code:
return

is used. By prepending the keyword
Code:
thread
the called function is executed concurrently to the function that called it.

Examples
Code:
disableThirdPersonMode()
{
setDvar("cg_thirdPerson", 0);
}
This sets the third person mode dvar to value 0.
Code:
setFieldOfView(angle)
{
setDvar("cg_fov", angle);
}
This sets the field of view dvar to the new angle value given to the method as parameter.

Code:
getFavNumber()
{
return 1337;
}
Usage
Code:
disableThirdPersonMode();
Sequential call with no parameters.
Code:
setFieldOfView(90);
Sequential call with 1 parameter.
Code:
thread setFieldOfView(90);
Concurrent call with 1 parameter.

Code:
int number = getFavNumber();

Gets the return value from "getFavNumber()" and stores it to the number variable


_________________
Functions YBjg74I

Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum