Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


attempt to call global 'checkBox_getState' (a nil value)?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
pangshidaye
How do I cheat?
Reputation: 0

Joined: 24 Aug 2010
Posts: 2

PostPosted: Fri Oct 11, 2013 4:34 am    Post subject: attempt to call global 'checkBox_getState' (a nil value)? Reply with quote

Code:
function CEButton1Click(sender)
    step9On=[[
    Tutorial-i386.exe+284B7:
    db 90 90 90 90 90
    Tutorial-i386.exe+284E3:
    db 90 90 90 90 90
    ]]

    step9Off=[[
    Tutorial-i386.exe+284B7:
    call Tutorial-i386.exe+27DF0
    Tutorial-i386.exe+284E3:
    call Tutorial-i386.exe+27DF0
    ]]

    step9_m2On=[[
    alloc(newmem,2048)
    label(returnhere)
    label(originalcode)
    label(exit)

    newmem: //this is allocated memory, you have read,write,execute access
    //place your code here
    cmp [ebx+15],"Dave"
    je exit
    cmp [ebx+15],"Eric"
    je exit

    originalcode:
    mov [ebx+04],eax
    //fldz

    exit:
    fldz
    jmp returnhere

    "Tutorial-i386.exe"+27E76:
    jmp newmem
    returnhere:
    ]]

    step9_m2Off=[[
    dealloc(newmem)
    "Tutorial-i386.exe"+27E76:
    mov [ebx+04],eax
    fldz
    ]]

    if checkBox_getState(CETrainer_CECheckbox1) == 1 then
        autoAssemble(step9On)
    else
        autoAssemble(step9Off)
    end

    if checkBox_getState(CETrainer_CECheckbox2) == 1 then
        autoAssemble(step9_m2On)
    else
        autoAssemble(step9_m2Off)
    end
end


and then "Error:[string "function CEButton1Click(sender)..."]:49: attempt to call global 'checkBox_getState' (a nil value)"

Can anyone tell me what's fcking wrong with my code and how to fix it !! Evil or Very Mad
Back to top
View user's profile Send private message
daspamer
Grandmaster Cheater Supreme
Reputation: 54

Joined: 13 Sep 2011
Posts: 1588

PostPosted: Fri Oct 11, 2013 5:00 am    Post subject: Reply with quote

It's
Code:
checkbox_getState

not
Code:
checkBox_getState

_________________
I'm rusty and getting older, help me re-learn lua.
Back to top
View user's profile Send private message Visit poster's website
pangshidaye
How do I cheat?
Reputation: 0

Joined: 24 Aug 2010
Posts: 2

PostPosted: Fri Oct 11, 2013 5:13 am    Post subject: Reply with quote

DaSpamer wrote:
It's
Code:
checkbox_getState

not
Code:
checkBox_getState


Ooooh noooo!!!
It took me half an hour and.... Sad
Whatever,thks for help
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites