Author Topic: Wallet's Scripting Class episode III: Revenge of the Script  (Read 8232 times)

Last class day is today :(

Looking forward to Minigame Basics and Game/Website Communications though.

Not really last class. It's just the last time he's gonna make the doc.

Also why does this have a syntax error. :(

package Airtime
function servercmdairtime(%client, %failsafe, %word1) {
   %airtime = 1;
   %scale = 3;
   %vec = %client.player.getEyeVector();
   while(%airtime <= %word1 && %failsafe < %word1) {
      %client.player.addvelocity(vectorScale(%vec, %scale));
      %airtime++;
      %failsafe++;
      commandToClient(%client, 'bottomprint', "%airttime", 1);
   }
}
activatepackage(Airtime);

Little script I've been working. on. B)
I need a little help with it. It's a little flying script.

Edit: Oh right there's a syntax error at

Add-Ons/Script_Airtime/server.cs Line: 2 - Syntax error.
>>> Some error context, with ## on sides of error halt:
ackage Airtime

function ##s##ervercmdairtime(%client, %failsafe, %word1) {

^%airtime = 1;

^%scale = 3;

^%vec = %client.player.getEyeVector();

^while(%airtime <= %word1 && %failsafe < %word1) {

^^%client.player.addvelocity(vectorScale(%vec, %scale));

^^%airtime++;

^^%failsafe++;

« Last Edit: July 21, 2011, 10:15:36 AM by Uxie »

package Airtime needs a { and a close };


package Airtime
{
function servercmdairtime(%client, %failsafe, %word1) {
   %airtime = 1;
   %scale = 3;
   %vec = %client.player.getEyeVector();
   while(%airtime <= %word1 && %failsafe < %word1) {
      %client.player.addvelocity(vectorScale(%vec, %scale));
      %airtime++;
      %failsafe++;
      commandToClient(%client, 'bottomprint', "%airttime", 1);
   }
}
};
activatepackage(Airtime);

Err, I've never seen packages do that. And why would there be two }'s? I understand the }; now, though.

Nevermind, how did I not realize.
« Last Edit: July 21, 2011, 12:41:18 PM by Uxie »

heedicalking's solution would have been immediately recognizable had he properly used white space to indent all his brackets.  :cookieMonster:

heedicalking's solution would have been immediately recognizable had he properly used white space to indent all his brackets.  :cookieMonster:

How far are you in the class now. I want to join pl0x.

How far are you in the class now. I want to join pl0x.
LOL

How far are you in the class now. I want to join pl0x.
Todays the last real day of class br0.

I'm kind of out of it today and I think I may be coming down with something. I think I should postpone for a day.

Well, I'm going night swimming tonight... Which is horrible since I requested the topics for tonight... I won't make class Wallet, so if you are better, don't expect me tonight :(

LOL what should I do? :|
...
Meh I'll cancel again.
We'll do it tomorrow (Saturday). Don't show up late because it might not be an hour.

LOL what should I do? :|
...
Meh I'll cancel again.
We'll do it tomorrow (Saturday). Don't show up late because it might not be an hour.
stuff wallet I'm lucky again. Otherwise I would have showed up 45 minutes late.

I will be at class today Wallet.

Noone's at class. :c Neither is mrwallet.

Yeah I was gonna stop in to see if anyone wanted help with something but a few things came up at once and I forgot.  :panda:

I guess you can ask me here or on steam. I think we're done with ustream.