TC官方合作论坛

 找回密码
 立即注册
查看: 1254|回复: 4

[已解决] 是不合法的变量名或者是没定义的变量名。哪里不对呀。

[复制链接]
发表于 2014-2-21 14:57:16 | 显示全部楼层 |阅读模式

马上加入TC

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

x
#include"mousedrift.t"

namespace redblue
//定义默认空间

function  abbred( blood)//人物加红操作
    //这里添加你要执行的代码
    int retum,control
    int isfind,chanx,chany
    control=4
    while(control>0)
        if(blood==70)
            isfind=color.findpic(0,0,660,100,"rc:judge.bmp",#101010,1.0,0,chanx,chany)
            if(chanx>0&&chany>0)
                int strclor=color.getpixelcolor(chanx+27,chany+13)
                if(strclor==524432)
                    retum=1
                    break
                else
                    mousedrift.mobile(chanx,chany+17)
                    help.sleep(1000)
                    mouse.rightclick(1)
                    help.sleep(1000)
                    mousedrift.mobile(chanx-30,chany+350)
                    control=control-1
                    retum=0
                endif
            else
                help.sleep(100)
                continue           
            endif
        else
            if(blood==50)
                isfind=color.findpic(0,0,660,100,"rc:judge.bmp",#101010,1.0,0,chanx,chany)
                if(chanx>0&&chany>0)
                    int strclor=color.getpixelcolor(chanx+19,chany+13)
                    if(strclor==120)
                        retum=1
                        break
                    else
                        mousedrift.mobile(chanx,chany+17)
                        help.sleep(1000)
                        mouse.rightclick(1)
                        help.sleep(1000)
                        mousedrift.mobile(chanx-30,chany+350)
                        control=control-1
                        retum=0
                    endif
                else
                    help.sleep(100)
                    continue         
                endif
            endif
        endif
    endwhile  
    return retum   
endfunction

function  abbblue()
    int isfind,chanx,chany

    isfind=color.findpic(0,0,660,100,"rc:judge.bmp",#101010,1.0,0,chanx,chany)
    if(chanx>0&&chany>0)
        int strclor=color.getpixelcolor(chanx+19,chany+13)
        help.messagebox(convert.inttostr())
    endif
    return 0
endfunction

endnamespace
//空间结束语句

>错误:D:\TC\redblue.t 行号:65 错误信息:'convert.inttostr'是不合法的变量名或者是没定义的变量名

回复

使用道具 举报

发表于 2014-2-21 15:56:57 | 显示全部楼层
去看看新版的帮助文档吧!你这是老式语法

改一下:help.messagebox(type.cstr(strclor)  )
回复 支持 反对

使用道具 举报

 楼主| 发表于 2014-2-21 15:16:16 | 显示全部楼层
#include"mousedrift.t"

namespace redblue
//定义默认空间

function  abbred( blood)//人物加红操作
    //这里添加你要执行的代码
    int retum,control
    int isfind,chanx,chany
    control=4
    while(control>0)
        if(blood==70)
            isfind=color.findpic(0,0,660,100,"rc:judge.bmp",#101010,1.0,0,chanx,chany)
            if(chanx>0&&chany>0)
                int strclor=color.getpixelcolor(chanx+27,chany+13)
                if(strclor==524432)
                    retum=1
                    break
                else
                    mousedrift.mobile(chanx,chany+17)
                    help.sleep(1000)
                    mouse.rightclick(1)
                    help.sleep(1000)
                    mousedrift.mobile(chanx-30,chany+350)
                    control=control-1
                    retum=0
                endif
            else
                help.sleep(100)
                continue           
            endif
        else
            if(blood==50)
                isfind=color.findpic(0,0,660,100,"rc:judge.bmp",#101010,1.0,0,chanx,chany)
                if(chanx>0&&chany>0)
                    int strclor=color.getpixelcolor(chanx+19,chany+13)
                    if(strclor==120)
                        retum=1
                        break
                    else
                        mousedrift.mobile(chanx,chany+17)
                        help.sleep(1000)
                        mouse.rightclick(1)
                        help.sleep(1000)
                        mousedrift.mobile(chanx-30,chany+350)
                        control=control-1
                        retum=0
                    endif
                else
                    help.sleep(100)
                    continue         
                endif
            endif
        endif
    endwhile  
    return retum   
endfunction

function  abbblue()
    int isfind,chanx,chany
   
    isfind=color.findpic(0,0,660,100,"rc:judge.bmp",#101010,1.0,0,chanx,chany)
    if(chanx>0&&chany>0)
        int strclor=color.getpixelcolor(chanx+19,chany+13)
        help.messagebox(convert.inttostr(strclor))
    endif
    return 0
endfunction

endnamespace
//空间结束语句


>错误:D:\TC\redblue.t 行号:65 错误信息:'convert.inttostr'是不合法的变量名或者是没定义的变量名



上面那个有被我删除的地方,这个是全的
回复 支持 反对

使用道具 举报

 楼主| 发表于 2014-2-21 15:17:14 | 显示全部楼层
help.messagebox(convert.inttostr(strclor))                     65行是这段
回复 支持 反对

使用道具 举报

发表于 2014-2-21 16:11:45 | 显示全部楼层
convert.inttostr 是老版本的命令.
现在 转换 命令已经更改为 类型
这是一个老版本的脚本.建议学习的时候,下载新版本的教程.
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关闭

推荐上一条 /2 下一条

关闭

小黑屋|TC官方合作论坛 (苏ICP备18045623号)

GMT+8, 2024-9-24 09:42 , Processed in 0.053327 second(s), 23 queries .

Powered by 海安简单软件服务部

© 2008-2019 版权所有 保留所有权利

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