|
|
Joined: Aug 2002
Posts: 1
Junior Member
|
Junior Member
Joined: Aug 2002
Posts: 1 |
I cant seem to figure out why the following wont work:
moveAdude('guy',new Array(37,37,40,40))
function moveAdude(dude,cords) { setTimeout("moveAdude("+dude+","+cords+")",401) }
after the setTimeout calls for it again it changes the values of dude from "guy" to [object] and cords to 37 I want it to just return the same value each time.
|
|
|
|
Joined: Sep 2000
Posts: 4,211
Master Hacker
|
Master Hacker
Joined: Sep 2000
Posts: 4,211 |
Try this: moveADude('guy', new Array(37,37,40,40))
function moveADude(dude, cords) { setTimeout(moveAdude(dude, cords), 401) }
|
|
|
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
|
|
Posts: 1,157
Joined: July 2001
|
|
Forums63
Topics37,573
Posts293,925
Members13,849
|
Most Online5,166 Sep 15th, 2019
|
|
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
|
|
|
|
|