View Single Post
  #3  
Old 06-27-2011, 05:33 PM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
I guess you solved your problem but for thread completion sake...

In GS2 you have to use double-quotes on strings (text). I.e:

player.attr[1] = "mattsmask1.png";

You should also get in the habit of indenting your scripts. I.e:

PHP Code:
//#CLIENTSIDE
function onWeaponFired() {
  
player.attr[1] = "mattsmask1.png";
} 
It'll help down the line when you start using if statements, and the like. It also improves readability and makes your code easier to maintain. I.e:

PHP Code:
function onCreated() {
  if (
whatever) {
    
dowhatever();
    if (
areusure) {
      
yep();
    } else {
      
nope();
    }
  }
} 
__________________
Quote:
Reply With Quote