Home   Help Search Login Register  

Author Topic: Script Problems  (Read 477 times)

0 Members and 1 Guest are viewing this topic.

Offline Messiah

  • Honourary OFPEC Patron & Drinking Buddy of Wolfsbane
  • Honoured Contributor
  • ***
  • OFPEC Veteran
    • Project UK Forces
Script Problems
« on: 02 Jun 2005, 16:11:11 »
Just wrote a script off the top of my head... its basically a script that allows the player to choose any letter of the alphabet for a texture on the side of a tank...

Code: [Select]
_vehicle = _this select 0
_letter = _this select 1
_type = _this select 2
_texture = s.paa

#Letter

?(_letter == A) : (_texture = a.paa)
?(_letter == B) : (_texture = b.paa)
?(_letter == C) : (_texture = c.paa)
?(_letter == D) : (_texture = d.paa)
?(_letter == E) : (_texture = e.paa)
?(_letter == F) : (_texture = f.paa)
?(_letter == G) : (_texture = g.paa)
?(_letter == H) : (_texture = h.paa)
?(_letter == I) : (_texture = i.paa)
?(_letter == J) : (_texture = j.paa)
?(_letter == K) : (_texture = k.paa)
?(_letter == L) : (_texture = l.paa)
?(_letter == M) : (_texture = m.paa)
?(_letter == N) : (_texture = n.paa)
?(_letter == O) : (_texture = o.paa)
?(_letter == P) : (_texture = p.paa)
?(_letter == Q) : (_texture = q.paa)
?(_letter == R) : (_texture = r.paa)
?(_letter == S) : (_texture = s.paa)
?(_letter == T) : (_texture = t.paa)
?(_letter == U) : (_texture = u.paa)
?(_letter == V) : (_texture = v.paa)
?(_letter == W) : (_texture = w.paa)
?(_letter == X) : (_texture = x.paa)
?(_letter == Y) : (_texture = y.paa)
?(_letter == Z) : (_texture = z.paa)

#Type

?(_type == 1) : goto "CH"
?(_type == 2) : goto "NonCH"

#NonCH

_vehicle setobjecttexture [12, "\UKF_Warrior\Letters\for.paa"]
_vehicle setobjecttexture [14, "\UKF_Warrior\Letters\_texture"]

exit

#CH

_vehicle setobjecttexture [13, "\UKF_Warrior\Letters\for.paa"]
_vehicle setobjecttexture [15, "\UKF_Warrior\Letters\_texture"]

exit

now it errors with unknown operator when i try and make _texture = a etc and then it also errors with not being able to find the texture (which is unsuprising)... now, have i gone about this the wrong way completely, or are there justa mistakes in my script?
Proud Member of the Volunteer Commando Battalion

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re:Script Problems
« Reply #1 on: 02 Jun 2005, 17:25:18 »
i think you may need inverted commas (" ") around those .paa files...