# User List Problem

**URL:** <https://forum.kirupa.com/t/user-list-problem/161543>\
**Category:** Uncategorized\
**Created:** [September 5, 2005, 1:48am UTC](https://forum.kirupa.com/t/user-list-problem/161543 "2005-09-05T01:48:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chase](https://avatars.discourse-cdn.com/v4/letter/c/76d3ee/32.png) [@Chase](https://forum.kirupa.com/u/Chase)\
**Post date:** [September 5, 2005, 1:48am UTC](https://forum.kirupa.com/t/user-list-problem/161543/1 "2005-09-05T01:48:04Z")

</div>

Hey, i’m making the online drag racing game: 2qRacing. I seem to have ran into a problem making the userList for the online chat community, im making the users PM’able, but there are several problems which are:

The clickable MC for the users dont add for each username online.

This problem I have I think is seemed to be caused by a array which is trapped inside the flash “FOR” loop. So if anyone knows how to pull this off, then heres my Action script code:

[Location: \_root.userList]:

```auto

_global.users = new Array(); 
lv = new LoadVars(); 
lv.onLoad = function() { 
fl = this.userList;
_global.users = fl.split(",");
c = users.length;
for (_global.i=0; i<c; ++i) {
duplicateMovieClip("pm", "pm"+i, 0);
setProperty ("pm"+i, _y, "30");
trace(users*);
}
};
lv.load("[http://68.102.62.109:8012/2qRacing/chat/testing.php](http://68.102.62.109:8012/2qRacing/chat/testing.php)");

```

Then heres the pm movie clips code:

[Location: \_root.userList.pm]:

```auto
 
uname.text=_root.userList.bleh[1];

```

the things inside this movie clip is:  
1 textbox (instance name: uname & and the variable: \_root.userList.users[\_root.userList.i])  
… someone please help… if your wondering the code of the php to further help you then heres that also:

```php
 
<?
require_once("db/db.php");
$userList = array();
$result = mysql_query('select * from c_users');
$numrows = mysql_num_rows($result);
while($row = mysql_fetch_array($result)) {
$name = $row['username'];
$room = $row['room'];
$userList["$name"] = "$name";
}
ksort($userList);
$list = implode(",", $userList);
echo "userList=";
echo "$list";
?>

```

And the SWF, and FLA are attached. Please help this is a very urgant situation.

CONTACT BY AIM IF YOU ALSO WISH TO HELP WITH MORE OF THE GAME!

AIM: w33dless
