Blockland Forums > General Discussion

Why are variables being bitchy?

Pages: << < (3/3)

Wesley Williams:

I get the concept of variables in this sense, but as far as calling upon variables... how do you put data into a variable, so that it knows like "if the above is true, do variable 'lol2' and [/b]variable 'lol2' will make this brick red[/b]" Where is this part in VCE, and in scripting? This is the one major problem I have with scripting D:

Like in a script, it'll just say "these variables are in this function". And then during the function, it calls the variables during certain commands and whatever. But nowhere in scripts do I see people giving the variables anything more than a number value, and I never see the number value being treated as making a GUI pop up or something...

I hope I didn't go too far off topic... sorry about this. Just this is a real problem I'm having with understanding such things.

Orion:


--- Quote from: Wesley Williams on March 02, 2011, 07:30:30 PM ---Inn scripting?

--- End quote ---

$variable1 = 5
$variable2 = 10
$variable3=15

    if(variable1 + variable2 == variable3)
{
    echo("hey boys, looks like "SPC $variable1 @" plus "SPC $variable2 @" equals "SPC $variable3 @"!");

    else
    echo("hey boys, looks like  "SPC $variable1 @" plus "SPC $variable2 @" doesn't equal "SPC $variable3 @"!");
}

at least i think, i'm a terrible scripter.


otto-san:


--- Quote from: Orion on March 02, 2011, 07:53:40 PM ---$variable1 = 5;
$variable2 = 10;
$variable3=15;

    if((variable1 + variable2) == variable3)
{
    echo("hey boys, looks like"SPC $variable1 @" plus"SPC $variable2 @" equals "SPC $variable3 @"!");

    else
    echo("hey boys, looks like "SPC $variable1 @" plus"SPC $variable2 @" doesn't equal "SPC $variable3 @"!");
}

at least i think, i'm a terrible scripter.


--- End quote ---


--- Code: ---$variable1 = 5;
$variable2 = 10;
$variable3=15;

if((variable1 + variable2) == variable3)
{
    echo("hey boys, looks like"SPC $variable1 @" plus"SPC $variable2 @" equals "SPC $variable3 @"!");
}
else
{
    echo("hey boys, looks like "SPC $variable1 @" plus"SPC $variable2 @" doesn't equal "SPC $variable3 @"!");
}
--- End code ---

or even


--- Code: ---$variable1 = 5
$variable2 = 10
$variable3=15

if(variable1 + variable2 == variable3)
    echo("hey boys, looks like "SPC $variable1 @" plus "SPC $variable2 @" equals "SPC $variable3 @"!");
else
    echo("hey boys, looks like  "SPC $variable1 @" plus "SPC $variable2 @" doesn't equal "SPC $variable3 @"!");

--- End code ---


Sheath:

Mmk well this is sliding off the tracks, my question was answered. Thanks.

Pages: << < (3/3)

Go to full version