---+!! =paraworld.lobby.CreateRoom= <div style="float: right; margin: 5px; width: 250px; color: #4e5155; background-color: #f0eded; border: #ccc 1px solid; padding: 5px"> *Contents* %TOC% </div> ---++ Description 创建房间。当一个用户成功创建一个房间后,该用户之前所创建的所有房间都将被删除 ---++ Parameters |*Required*|*Name*|*Type*|*Description*| |<font color="#4682b4">required</font>|sessionKey|%BLUE%string%ENDCOLOR%|用户凭证。| |<font color="#4682b4">optional</font>|worldID|%BLUE%int%ENDCOLOR%|房间所关联的World的ID,worldID与worldPath必须有一个有值,如果worldID有值,则忽略worldPath| |^|worldPath|%BLUE%string%ENDCOLOR%|房间所关联的World的Path,worldID与worldPath必须有一个有值,如果worldID有值,则忽略worldPath| |^|joinPassword|%BLUE%string%ENDCOLOR%|加入此房间需要的密码。如果不设密码,则不传此参数。| |^|description|%BLUE%string%ENDCOLOR%|房间的描述信息| |^|maxClients|%BLUE%int%ENDCOLOR%|此房间最多可容纳的人数,默认值为100| |^|format|%BLUE%int%ENDCOLOR%|返回的数据格式(0:XML 1:JSON),默认值为0| ---++ Example Return XML <verbatim> <msg xmlns=""> <newRoomID type="int">1</newRoomID> </msg> </verbatim> ---++ Example Return JSON <verbatim> {"newRoomID":"1"} </verbatim> ---++ Error Codes 当发生异常时,返回数据中会有一个“errorCode”节点,该节点记录了错误码。0:无异常 500:未知错误 499:提供的数据不完整 498:非法的访问 497:数据不存在或已被删除 496:未登录 查看完整的[[ErrorCodes][Error Code]] ---++ Test Cases ---+++!! case 1 Input: <verbatim> { ["description"]="This is a test room", ["sessionKey"]="ed06733e-986d-4236-8fc8-9f8300456c21", ["maxClients"]=300, ["worldID"]=9, ["joinPassword"]="password", } </verbatim> _Result_: <verbatim> { ["newRoomID"]=1, } </verbatim>
E
dit
|
A
ttach
|
P
rint version
|
H
istory
: r4
<
r3
<
r2
<
r1
|
B
acklinks
|
V
iew topic
|
Ra
w
edit
|
M
ore topic actions
Topic revision: r4 - 2008-12-10
-
CaoYF
Home
Site map
CCWeb web
HaqiTeen web
Main web
ParaEngine web
TWiki web
Main Web
Users
Groups
Index
Search
Changes
Notifications
RSS Feed
Statistics
导航页WebTopMenu
Preferences
开发指南
Getting Started
ParacraftSDK
NPL
MCML
NPL Reference Manual
美术Mod
Account
Log In
English
简体中文
簡體中文
E
dit
A
ttach
Copyright © 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