The following warnings occurred:
Warning [2] Undefined array key "lockoutexpiry" - Line: 94 - File: global.php PHP 8.4.12 (Linux)
File Line Function
/global.php 94 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined array key "lockoutexpiry" - Line: 573 - File: global.php PHP 8.4.12 (Linux)
File Line Function
/global.php 573 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined variable $can_access_moderationqueue - Line: 752 - File: global.php PHP 8.4.12 (Linux)
File Line Function
/global.php 752 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined array key "avatartype" - Line: 892 - File: global.php PHP 8.4.12 (Linux)
File Line Function
/global.php 892 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined array key "avatartype" - Line: 892 - File: global.php PHP 8.4.12 (Linux)
File Line Function
/global.php 892 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined variable $awaitingusers - Line: 34 - File: global.php(959) : eval()'d code PHP 8.4.12 (Linux)
File Line Function
/global.php(959) : eval()'d code 34 errorHandler->error
/global.php 959 eval
/printthread.php 16 require_once
Warning [2] Undefined array key "style" - Line: 1024 - File: global.php PHP 8.4.12 (Linux)
File Line Function
/global.php 1024 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined property: MyLanguage::$lang_select_default - Line: 5327 - File: inc/functions.php PHP 8.4.12 (Linux)
File Line Function
/inc/functions.php 5327 errorHandler->error
/global.php 1024 build_theme_select
/printthread.php 16 require_once
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.4.12 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.4.12 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.4.12 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.4.12 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.4.12 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.4.12 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.4.12 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.4.12 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.4.12 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.4.12 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.4.12 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.4.12 (Linux)
File Line Function
/printthread.php 165 errorHandler->error



2DWorlds Forums
The stupidest script ever to be made. - Printable Version

+- 2DWorlds Forums (http://2dworlds.buildism.net/forum)
+-- Forum: 2DWorlds (http://2dworlds.buildism.net/forum/forumdisplay.php?fid=4)
+--- Forum: Scripting (http://2dworlds.buildism.net/forum/forumdisplay.php?fid=13)
+--- Thread: The stupidest script ever to be made. (/showthread.php?tid=7706)



The stupidest script ever to be made. - Sazaho - 08-04-2011

Okay. So here is my script, obviously it doesn't work, because of my lack of scripting knowledge, and I was wondering what is missing.
The script is a script to change the player's layer by pressing q and e.

print("Yo, yo, yo. Whazzup mah homiiieeeess!!")

P = Player.Layer

Function Keydown (q)
P = P +1

Function Keydown (e)
P = P -1





RE: The stupidest script ever to be made. - Qwertygiy - 08-04-2011

Well, you need to define Player.

And you need ends on functions.

And you need link(event, function).

And of course you can't have a layer of -1 or of 3.

Here's how I would code this script, inside a tool.

Oh yeah and [ lua ] tags FTW!

[lua]
local tool = script.Parent -- creating a variable
local player = tool.Parent.Parent -- creating a variable from a variable
local character = player.Character
local layer = character:getChild("Body").Layer
local minimum = 0 --you can't have a layer of -1
local maximum = 2 --you can't have a layer of 3

--That's all the variables.
print("Variables loaded!")

function RaiseLayer()
if layer < maximum then
--if the character's layer is below 2 then
layer = layer + 1
else
--if the layer is 2 then
print("You are on the highest layer already.")
end end --Always remember the ends for "do"s, "if"s, and "function"s.

function LowerLayer()
if layer > minimum then
--if the layer is above 0 then
layer = layer - 1
else
--if the layer is 0 then
print("You are on the lowest layer already.")
end end

function KeyPressed(key) --This function contains a variable in itself.
if string.lower(key) == "q" then --Works with caps on
RaiseLayer() --Calls this function
elseif string.lower(key) == "e" then
LowerLayer() --Calls that function
end end

print("Functions loaded!")

link(tool.KeyDown, KeyPressed) --Links the tool being keypressed with the function
[/lua]


RE: The stupidest script ever to be made. - Glome - 08-04-2011

[lua]
game.World:remove();
[/lua]

Put that in your game than play it.


RE: The stupidest script ever to be made. - tomi123456789 - 08-06-2011

whats the script?




RE: The stupidest script ever to be made. - Assassin - 08-06-2011

Lol better than mine a lot of times.


RE: The stupidest script ever to be made. - Duck - 08-07-2011

I already made a script to do this :3

But anyway

You need to put some function ends

You need to call the functions

And you need to actually check the keydown to see what key was pressed

And you need to define player