【发布时间】:2015-05-12 22:26:31
【问题描述】:
所以我正在编写一个非常基本的“游戏”程序,今天才真正开始编码,但遇到了问题。我正在关注的教程http://home.cmit.net/rwolbeck/programmingtutorial/index.htm 建议我不需要指定一个变量是一个整数变量,但无论我是否这样做,BlitzMax 都会中途停止编译,并显示错误消息“编译错误:无法将 'String' 转换为 'Int'"
name$ = Input("What is your name? ")
Print "Hello " + name$
answer = Input("What is 2 and 2? ")
If name$ = "Kyle"
Print "Kyle is always right."
WaitKey()
End
EndIf
If answer = 4
Print "No, 2 and 2 is 22."
Else
Print "No, 2 and 2 is 4."
EndIf
WaitKey()
End
关于出了什么问题以及如何解决它的任何想法?
附:今天刚加入这个网站,但我做了多次搜索,但没有找到任何回答这个特定问题/问题的东西。
【问题讨论】: