generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Lua challenge

Previous Thread :: Next Thread 
chimmihc is not online. chimmihc
Joined: 01 Sep 2014
Total Posts: 17143
25 Jul 2015 05:34 PM
Challenge = String reverse

Dificulty = mtn dew

Language = Lua

Restrictions = No string.sub or string.gmatch

Reward = 10 points


Bringing HTML up on this thread for ANY reason auto fails the challenge for you.


Begin.
Report Abuse
Goulstem is not online. Goulstem
Joined: 04 Jul 2012
Total Posts: 7177
25 Jul 2015 05:36 PM
lolwat..

local str = 'Hello';

print(str:reverse());
Report Abuse
MakerModelLua is not online. MakerModelLua
Joined: 24 Feb 2013
Total Posts: 3544
25 Jul 2015 05:36 PM
print(string.reverse("mtn dew"))
Report Abuse
bohdan77 is not online. bohdan77
Joined: 10 Aug 2008
Total Posts: 7944
25 Jul 2015 05:36 PM
string.reverse("get rekt")
Report Abuse
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
25 Jul 2015 05:37 PM
Lol chim get rekt by a string library function.

Challenge Auto Ruined
Report Abuse
TimeTicks is not online. TimeTicks
Joined: 27 Apr 2011
Total Posts: 27115
25 Jul 2015 05:38 PM
print(string.reverse("!uoy evol I ,cimmihC iH"))

Output: Hi Chimmic, I love you!

Is that good?


"Talk is cheap. Show me the code." - Linus Torvalds
Report Abuse
QuintinityZero is not online. QuintinityZero
Joined: 01 Oct 2008
Total Posts: 10618
25 Jul 2015 05:40 PM
Even though this challenge was a fail, they are fun! Make more.
Report Abuse
instawin is not online. instawin
Joined: 04 Jun 2013
Total Posts: 8777
25 Jul 2015 05:41 PM
i will be the only one to fail this challenge:

"You Made A Typo In Your Forum You Meant Html Challenge!!!!!!!!!!!!!!!!!!!!!!!!!!!"
Report Abuse
chimmihc is not online. chimmihc
Joined: 01 Sep 2014
Total Posts: 17143
25 Jul 2015 05:43 PM
I didn't think I would have to explain that the challenge was to create your own function....
Report Abuse
Darkenus is not online. Darkenus
Joined: 17 Jul 2014
Total Posts: 1997
25 Jul 2015 05:43 PM
@Quin, yes, these challenges are fun, even though some people create flaws in their challenges ;D
Report Abuse
Goulstem is not online. Goulstem
Joined: 04 Jul 2012
Total Posts: 7177
25 Jul 2015 05:49 PM
local str = 'ttoh gnikcuf si metsluoG';
local string = setmetatable({},{__index = string;});

string.flip = function(s)
local new = {};
for i = 1,#s do
a = i -1;
new[#new+1] = s:sub(#s-a,#s-a);
end
return table.concat(new,'');
end

print(string.flip(str));
Report Abuse
Goulstem is not online. Goulstem
Joined: 04 Jul 2012
Total Posts: 7177
25 Jul 2015 05:50 PM
10 points for me?? Any extra since I added it to the string librari? c;
Report Abuse
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
25 Jul 2015 05:52 PM
Okay @chim

My own function:


function R(s)return s:reverse()end



lol
Report Abuse
Goulstem is not online. Goulstem
Joined: 04 Jul 2012
Total Posts: 7177
25 Jul 2015 05:52 PM
Damnit I used sub
Report Abuse
TimeTicks is not online. TimeTicks
Joined: 27 Apr 2011
Total Posts: 27115
25 Jul 2015 05:52 PM
@ goulstem

No string.sub or string.gmatch

You failed


"Talk is cheap. Show me the code." - Linus Torvalds
Report Abuse
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
25 Jul 2015 05:57 PM
But I never XD
Report Abuse
Darkenus is not online. Darkenus
Joined: 17 Jul 2014
Total Posts: 1997
25 Jul 2015 05:58 PM
He said goulstem. XD
Report Abuse
TimeTicks is not online. TimeTicks
Joined: 27 Apr 2011
Total Posts: 27115
25 Jul 2015 06:00 PM
this is too hard i quit


"Talk is cheap. Show me the code." - Linus Torvalds
Report Abuse
chimmihc is not online. chimmihc
Joined: 01 Sep 2014
Total Posts: 17143
25 Jul 2015 06:02 PM
I suppose war wins.
Report Abuse
rayk999 is not online. rayk999
Joined: 18 Feb 2011
Total Posts: 4705
25 Jul 2015 06:04 PM
local str = 'ttoh gnikcuf si metsluoG';
local string = setmetatable({},{__index = string;});

string.flip = function(s)
local new = {};
for i = 1,#s do
a = i -1;
new[#new+1] = string["sub"](s,#s-a,#s-a);
end
return table.concat(new,'');
end

print(string.flip(str));

pls
Report Abuse
MakerModelLua is not online. MakerModelLua
Joined: 24 Feb 2013
Total Posts: 3544
25 Jul 2015 06:05 PM
print(string.sub == string["sub"])
>true

u fail challenge
Report Abuse
rayk999 is not online. rayk999
Joined: 18 Feb 2011
Total Posts: 4705
25 Jul 2015 06:06 PM
print(MakerModelLua == nil)
> true

nob ;c
Report Abuse
Goulstem is not online. Goulstem
Joined: 04 Jul 2012
Total Posts: 7177
25 Jul 2015 06:18 PM
I'm still working on this.. war shall not win.
Report Abuse
bohdan77 is not online. bohdan77
Joined: 10 Aug 2008
Total Posts: 7944
25 Jul 2015 06:44 PM
pastebin.com/m7i9UNyv

my code was breaking some kind of ROBLOX rule so
Report Abuse
bohdan77 is not online. bohdan77
Joined: 10 Aug 2008
Total Posts: 7944
25 Jul 2015 06:49 PM
where's my 10 points
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image