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
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
Can anyone convert from RBLX to Buildism? - 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: Can anyone convert from RBLX to Buildism? (/showthread.php?tid=1240)



Can anyone convert from RBLX to Buildism? - InternetGuy - 01-30-2011

Hoping someone can, I don't mind if you can't.
...
function onTouch(hit)
hit.Parent:kill()
end
script.Parent.Touched:connect(onTouch)


RE: Can anyone convert from RBLX to Buildism? - Jacob__mybb_import1 - 01-31-2011

function onCollide(part)
if part.Parent:isA("Character") then
part.Parent.Health = 0
end
end

link(script.Parent.Collided, onCollide)


RE: Can anyone convert from RBLX to Buildism? - guest - 01-31-2011

There :

Code:
function onTouch(part)
    if part.Parent:isA("Character") then
        part.Parent.Health = 0
    end
end

link(script.Parent.Collided, onTouch)



RE: Can anyone convert from RBLX to Buildism? - ____mybb_import1182 - 02-11-2011

I kind of like anonymous functions better

Code:
link(script.Parent.Collided,
function(p)
    print("Anonymous functions, for the win!")
    pcall(function()
        p.Parent.Health = 0
    end
end)



RE: Can anyone convert from RBLX to Buildism? - Jacob__mybb_import1 - 02-11-2011

You need the Parent:isA("Character"), otherwise your script will break if the part hits something that's not a character.


RE: Can anyone convert from RBLX to Buildism? - ____mybb_import1182 - 02-11-2011

(02-11-2011, 12:48 AM)Jacob_ Wrote: You need the Parent:isA("Character"), otherwise your script will break if the part hits something that's not a character.

Protected Call (PCall) can runs a function in a protected mode where it will catch any errors, if none, it runs the code. So basically, anything that 'breaks' defined in PCall's first arguement will not affect the scripts ability to run.


RE: Can anyone convert from RBLX to Buildism? - Qwertygiy - 02-11-2011

If anyone needs more help with converting Lua from ROBLOX to Buildism, go here: http://buildism.net/wiki/w/index.php?title=Converting_from_ROBLOX_Lua_to_Buildism_Lua