paraworld.lobby.CreateRoom

Description

创建房间。当一个用户成功创建一个房间后,该用户之前所创建的所有房间都将被删除

Parameters

Required Name Type Description
required sessionKey string 用户凭证。
optional worldID int 房间所关联的World的ID,worldID与worldPath必须有一个有值,如果worldID有值,则忽略worldPath
worldPath string 房间所关联的World的Path,worldID与worldPath必须有一个有值,如果worldID有值,则忽略worldPath
joinPassword string 加入此房间需要的密码。如果不设密码,则不传此参数。
description string 房间的描述信息
maxClients int 此房间最多可容纳的人数,默认值为100
format int 返回的数据格式(0:XML 1:JSON),默认值为0

Example Return XML

<msg xmlns="">
        <newRoomID type="int">1</newRoomID>
</msg>

Example Return JSON

{"newRoomID":"1"}

Error Codes

当发生异常时,返回数据中会有一个“errorCode”节点,该节点记录了错误码。0:无异常 500:未知错误 499:提供的数据不完整 498:非法的访问 497:数据不存在或已被删除 496:未登录

查看完整的Error Code

Test Cases

case 1

Input:

{

        ["description"]="This is a test room",

        ["sessionKey"]="ed06733e-986d-4236-8fc8-9f8300456c21",

        ["maxClients"]=300,

        ["worldID"]=9,

        ["joinPassword"]="password",

}

Result:

{

       ["newRoomID"]=1,

}
Topic revision: r4 - 2008-12-10 - CaoYF
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback