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



2DWorlds Forums
I can't get this to work - 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: I can't get this to work (/showthread.php?tid=9661)



I can't get this to work - Dignity - 07-15-2012

[lua]
parent=script.Parent

amount= Vec2D(1,1)
mx=Vec2D(5,5)
mn=Vec2D(0,0)
time=0.1

type="rise"

function rise()
parent.Size = parent.Size:add(amount)
end

function lower()
parent.Size = parent.SizeConfusedub(amount)
end

function loop()
print(type)
if (type=="rise") and (parent.Size<=mx) then
type="lower"
elseif (type=="rise") then
rise()
elseif (type=="lower") and (parent.Size>=mn) then
type="rise"
elseif (type=="lower") then
lowerTide()
end end

while true do
sleep(time)
loop()
end
[/lua]

The error says "Script:20 _le is not defined for operand."
wut?
EDIT: Line 20 is "if (type=="rise") and (parent.Size<=mx) then"


RE: I can't get this to work - Qwertygiy - 07-16-2012

Vec2Ds can't be subtracted or added from each other.

[lua]
parent=script.Parent

amount= Vec2D(1,1)
mx=Vec2D(5,5)
mn=Vec2D(0,0)
time=0.1

type="rise"

function rise()
parent.Size = parent.Size:add(amount)
end

function lower()
parent.Size = parent.SizeConfusedub(amount)
end

function loop()
print(type)
if (type=="rise") and (parent.Size.x <= mx.x and parent.Size.y <= mx.y) then
type="lower"
elseif (type=="rise") then
rise()
elseif (type=="lower") and (parent.Size.x >= mn.x and parent.Size.y >= mn.y) then
type="rise"
elseif (type=="lower") then
lowerTide()
end end

while true do
sleep(time)
loop()
end
[/lua]