设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
查看: 1836|回复: 2
打印 上一主题 下一主题

[已经过期] 脚本哪里错了

[复制链接]

Lv1.梦旅人

梦石
0
星屑
50
在线时间
7 小时
注册时间
2013-12-9
帖子
19
跳转到指定楼层
1
发表于 2013-12-10 16:53:32 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有帐号?注册会员

x
class People
  attr_accessor:name,:age,:motherland
end
class People
  def talk
    print "my name is#{@name},age is{@age},motherland is{@motherland}"
  end
  end

p=People.new
p.name="zhangshan"
p.age=17
p.motherland="china"
p.talk
为什么输出总是 my name is zhangshan,age is{@age},motherland is{@motherland}"

点评

楼主下次不要发错区  发表于 2013-12-10 17:48

Lv2.观梦者

梦石
0
星屑
382
在线时间
929 小时
注册时间
2011-3-23
帖子
896
2
发表于 2013-12-10 16:56:20 | 只看该作者
坐等删帖

点评

为什么要删帖?移动一下不就好了。  发表于 2013-12-10 17:47
回复 支持 反对

使用道具 举报

Lv4.逐梦者 (版主)

梦石
0
星屑
9532
在线时间
5073 小时
注册时间
2013-6-21
帖子
3580

开拓者贵宾剧作品鉴家

3
发表于 2013-12-10 17:15:24 | 只看该作者
print "my name is #{@name},age is #{@age},motherland is #{@motherland}"

评分

参与人数 1星屑 +75 收起 理由
myownroc + 75 我很赞同

查看全部评分

回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2024-9-30 06:22

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表