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 property: MyLanguage::$archive_pages - Line: 2 - File: printthread.php(257) : eval()'d code PHP 8.4.12 (Linux)
File Line Function
/printthread.php(257) : eval()'d code 2 errorHandler->error
/printthread.php 257 eval
/printthread.php 117 printthread_multipage
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
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
onChatted - Printable Version

+- 2DWorlds Forums (http://2dworlds.buildism.net/forum)
+-- Forum: Off Topic (http://2dworlds.buildism.net/forum/forumdisplay.php?fid=5)
+--- Forum: Programming (http://2dworlds.buildism.net/forum/forumdisplay.php?fid=30)
+--- Thread: onChatted (/showthread.php?tid=6705)

Pages: 1 2


onChatted - Nyht - 07-09-2011

I've made a script using the onChatted function, however, the output says:

Script6: '=' expected near 'onChatted'.

So I decided to (yet again) turn to this community. I'll convert it to ROBLOX and test it there, even though it will have different methods.


[lua]npc = create("NPC")
label = create("Label")

print("Loaded Cloning Script")

--[[ function onChatted(msg) ]]--
if msg == "/clone" then
print("Cloning " .. speaker.Name)
npc.Parent = game.World
npc.Name = speaker.Name
label.Parent = npc
label.Text = speaker.Name .. "'s Clone"
npc.Skin = speaker.Character.Skin
print(speaker.Name .. " was successfully cloned.")
else
print(speaker.Name .. "was insuccessfully cloned.")
end
end
link(Player.Chatted, onChatted)[/lua]


RE: onChatted - Nice - 07-09-2011

(07-09-2011, 06:23 AM)Nyht Wrote: I've made a script using the onChatted function, however, the output says:

Script6: '=' expected near 'onChatted'.

So I decided to (yet again) turn to this community. I'll convert it to ROBLOX and test it there, even though it will have different methods.


[lua]npc = create("NPC")
label = create("Label")

print("Loaded Cloning Script")

--[[ fuction onChatted(msg) ]]--
if msg == "/clone" then
print("Cloning " .. speaker.Name)
npc.Parent = game.World
npc.Name = speaker.Name
label.Parent = npc
label.Text = speaker.Name .. "'s Clone"
npc.Skin = speaker.Character.Skin
print(speaker.Name .. " was successfully cloned.")
else
print(speaker.Name .. "was insuccessfully cloned.")
end
end
linkSadPlayer.Chatted, onChatted)
print(speaker.Name .. " was successfully cloned.")[/lua]


:crazy: Did you do all that?


RE: onChatted - Nyht - 07-09-2011

(07-09-2011, 08:14 AM)Nice Wrote:
(07-09-2011, 06:23 AM)Nyht Wrote: I've made a script using the onChatted function, however, the output says:

Script6: '=' expected near 'onChatted'.

So I decided to (yet again) turn to this community. I'll convert it to ROBLOX and test it there, even though it will have different methods.


[lua]npc = create("NPC")
label = create("Label")

print("Loaded Cloning Script")

--[[ fuction onChatted(msg) ]]--
if msg == "/clone" then
print("Cloning " .. speaker.Name)
npc.Parent = game.World
npc.Name = speaker.Name
label.Parent = npc
label.Text = speaker.Name .. "'s Clone"
npc.Skin = speaker.Character.Skin
print(speaker.Name .. " was successfully cloned.")
else
print(speaker.Name .. "was insuccessfully cloned.")
end
end
linkSadPlayer.Chatted, onChatted)[/lua]


:crazy: Did you do all that?

It is quite simple for an intermediate coder.

I fixed the double of line 14.


RE: onChatted - Duck - 07-09-2011

Well for some reason the start of your function is a note


RE: onChatted - Jacob__mybb_import1 - 07-09-2011

Maybe because you said "fuction" instead of "function"? Tongue


RE: onChatted - AK-47 - 07-09-2011

"Maybe because you said "fuction" instead of "function"? Tongue"

I laugh at myself when I get typos like this one.


RE: onChatted - Jacob__mybb_import1 - 07-09-2011

I still forget semicolons when writing PHP... and it was the first language I learned. [Image: facepalm.gif]


RE: onChatted - Qwertygiy - 07-09-2011

And you don't need a : between link and (.


Yeah, I'm constantly getting typos in my scripts. Stuff like part.Trasparency or game.Payers:getChildren.
(07-09-2011, 02:34 PM)Jacob_ Wrote: I still forget semicolons when writing PHP... and it was the first language I learned. [Image: facepalm.gif]

I've only started PHP two days ago. Long live w3schools and their massive database!


RE: onChatted - AK-47 - 07-09-2011

"game.Payers:getChildren"

You can't pay using children, that's illegal...


RE: onChatted - Qwertygiy - 07-09-2011

I honestly cannot believe how I managed to script for months on ROBLOX without knowing about Output. Seriously. Because I make so many little mistakes -- especially now that I know two versions of Lua and I keep trying to subconsciously intertwine them -- that I can't make a 50 line script without one typo.