|
| 19 Oct 2011 07:45 PM |
I'm going to have to put a bunch of if statements (well actually one with a bunch of else statements) for each helping verb for each pronoun in my script...
This will be fun... |
|
|
| Report Abuse |
|
|
Aaaboy97
|
  |
| Joined: 05 Apr 2009 |
| Total Posts: 6612 |
|
|
| 19 Oct 2011 07:46 PM |
local stuff = { "have" = function() end, "has" = function() end, --etc. }
stuff[verb]()
no more if statements!!! (idk if grammar is correct for helping verbs) |
|
|
| Report Abuse |
|
|
|
| 19 Oct 2011 07:47 PM |
| They are different each time. |
|
|
| Report Abuse |
|
|
|
| 19 Oct 2011 08:01 PM |
| Besides, for what I'm doing, putting them in tables would be more work than just writing them out. |
|
|
| Report Abuse |
|
|
|
| 19 Oct 2011 08:08 PM |
I = {be = "am", etc}
?
ot: 18744 > 18699 |
|
|
| Report Abuse |
|
|
|
| 19 Oct 2011 08:10 PM |
No. The if statements are large blocks of code with a lot of else statements. Let me show you an example:
if OBJ:find(" do ") or OBJ:find(" can ") then local Var1 = math.random(1, 8) if Var1 == 1 then sen = "I don't know, because you are "..RFT(Adjectives) isa = 2 elseif Var1 == 2 then sen = "Because." isa = 2 elseif Var1 == 3 then sen = "Because you are "..RFT(Adjectives) isa = math.random(1, 4) elseif Var1 == 4 then sen = "I don't know, "..RFT(Endings) isa = math.random(1, 2) == math.random(1, 2) and ran or 4 elseif Var1 == 5 then if math.random(1, 2) == math.random(1, 2) then sen = "Because you are "..RanVerb("pres")..s..RFT(People) else sen = "Because you are "..RanVerb("pres")..s..RFT(PPronouns) end isa = math.random(1, 4) elseif Var1 == 6 then sen = "Because you can." isa = 1 elseif Var1 == 7 or Var1 == 8 then sen = "Because you are "..RanVerb("pres")..s..RanNoun("either", true) isa = ran end |
|
|
| Report Abuse |
|
|
| |
|
|
| 19 Oct 2011 08:14 PM |
| Yep. That's my example. Read it. |
|
|
| Report Abuse |
|
|
|
| 19 Oct 2011 08:15 PM |
I did
to me, it makes like no sense .___. |
|
|
| Report Abuse |
|
|
|
| 19 Oct 2011 08:17 PM |
I copied and pasted it from the actual source. It's only a bit, so it contains variables and functions you wouldn't know of.
It's a new version of WB I'm making. The old version had ~2000 lines, but it was not done and this one I plan to make more efficient and shorter. |
|
|
| Report Abuse |
|
|
bombpaw
|
  |
| Joined: 15 Mar 2009 |
| Total Posts: 3484 |
|
| |
|
|
| 19 Oct 2011 08:19 PM |
| Switch? That is not a feature in Lua... |
|
|
| Report Abuse |
|
|
bombpaw
|
  |
| Joined: 15 Mar 2009 |
| Total Posts: 3484 |
|
|
| 19 Oct 2011 08:24 PM |
| http://lua-users.org/wiki/SwitchStatement |
|
|
| Report Abuse |
|
|
|
| 19 Oct 2011 08:26 PM |
"Lua lacks a C-style switch[1] statement."
Stopped reading after that. |
|
|
| Report Abuse |
|
|
|
| 19 Oct 2011 08:28 PM |
| Never mind, I think I might actually do that, but it probably will not save me much work. |
|
|
| Report Abuse |
|
|
|
| 19 Oct 2011 08:31 PM |
"['?'] = function() return is_canadian and "eh" or "" end"
lol |
|
|
| Report Abuse |
|
|
aboy5643a
|
  |
| Joined: 20 Nov 2010 |
| Total Posts: 2785 |
|
|
| 19 Oct 2011 08:32 PM |
@crazy
+5 respect for making a crack on half of this forum (yes, half of the forum is Canadian. Coincidence, eh? trolololol)
"Locked" - Sorcus |
|
|
| Report Abuse |
|
|
|
| 19 Oct 2011 08:34 PM |
actually, half this forum is liek british or something
then liek another quarter is dutch
then the rest of us are from random places |
|
|
| Report Abuse |
|
|
aboy5643a
|
  |
| Joined: 20 Nov 2010 |
| Total Posts: 2785 |
|
|
| 19 Oct 2011 08:36 PM |
UMG Y U AKS FOR PRESONUL INFO?! REPAWTED!!1111!!!TWENTYSEVEN11!!!1!
Who's british? /h4x
"Locked" - Sorcus |
|
|
| Report Abuse |
|
|
|
| 19 Oct 2011 08:51 PM |
Sounds painful.
- The naked old man who is possibly chocolate... |
|
|
| Report Abuse |
|
|
| |
|
|
| 19 Oct 2011 09:33 PM |
| im british but i live in amerikah :o |
|
|
| Report Abuse |
|
|
|
| 19 Oct 2011 09:33 PM |
im american
otehr countries y u stereotype |
|
|
| Report Abuse |
|
|
LocalChum
|
  |
| Joined: 04 Mar 2011 |
| Total Posts: 6906 |
|
|
| 19 Oct 2011 10:38 PM |
>datfunction
.________________________.
SRS |
|
|
| Report Abuse |
|
|
Quenty
|
  |
| Joined: 03 Sep 2009 |
| Total Posts: 9316 |
|
|
| 19 Oct 2011 10:46 PM |
I think most ROBLOX users are American. And then we take a comparison study of American Grammar vs. Norway grammar.
And... Happy Education Policy time. |
|
|
| Report Abuse |
|
|