| View previous topic :: View next topic   | 
	
	
	
		| Author | 
		Message | 
	
	
		Bennnie Newbie cheater
  Reputation: 0
  Joined: 29 Aug 2012 Posts: 11
 
  | 
		
			
				 Posted: Wed Aug 29, 2012 5:05 am    Post subject: Need some help | 
				       | 
			 
			
				
  | 
			 
			
				Hi,
 
 
Problem 1:
 
 
If got the following code
 
 
 	  | Code: | 	 		  
 
enabled=false
 
 
function CEButton1Click(sender)
 
     if enabled then
 
          enabled=false
 
          control_setEnabled(CETrainer_CETimer1, false)
 
          control_setCaption(CETrainer_CEButton1, "Auto refresh (Off)")
 
     else
 
          enabled=true
 
          control_setEnabled(CETrainer_CETimer1, true)
 
          control_setCaption(CETrainer_CEButton1, "Auto refresh (On)")
 
     end
 
end
 
 | 	  
 
 
and every time i use this code, i get an "Error:Access violation". It only works when i make the control_setEnabled lines in comment but this is obviously not what i want. Did i use the wrong command or is it a bug?
 
 
Problem 2:
 
 	  | Code: | 	 		  
 
armorAdd=addresslist_getMemoryRecordByDescription(addresslist, "armor")
 
armorValue=memoryrecord_getValue(armorAdd)
 
control_setCaption(CETrainer_CELabel10e, calculateReducedDamage(armorValue))
 
 
function calculateReducedDamage(value)
 
if value>0 then
 
doSomething()
 
end
 
 | 	  
 
armorValue is a float but i get the error "attempt to compare number with string" (at value>0) but i cannot set armorValue to an float manually, or should i do something else?
 
 
 
 
 
Thank you in advance!
 | 
			 
		  | 
	
	
		| Back to top | 
		 | 
	
	
		  | 
	
	
		mgr.inz.Player I post too much
  Reputation: 222
  Joined: 07 Nov 2008 Posts: 4438 Location: W kraju nad Wisla. UTC+01:00
  | 
		
			
				 Posted: Wed Aug 29, 2012 3:32 pm    Post subject: Re: Need some help | 
				       | 
			 
			
				
  | 
			 
			
				 	  | Bennnie wrote: | 	 		  
 
          control_setEnabled(CETrainer_CETimer1, false)
 
 | 	  
 
 
try this:
 
timer_setEnabled(CETrainer_CETimer1, false)
 
 
 
 	  | Bennnie wrote: | 	 		  
 
armorValue=memoryrecord_getValue(armorAdd)
 
 | 	  
 
 
memoryrecord_getValue(te): returns the current value of the cheat table entry as a string
 
 
So, 
 
armorValue=tonumber(memoryrecord_getValue(armorAdd))
 _________________
  | 
			 
		  | 
	
	
		| Back to top | 
		 | 
	
	
		  | 
	
	
		Bennnie Newbie cheater
  Reputation: 0
  Joined: 29 Aug 2012 Posts: 11
 
  | 
		
			
				 Posted: Thu Aug 30, 2012 5:59 am    Post subject:  | 
				       | 
			 
			
				
  | 
			 
			
				Thank you! it worked  
 | 
			 
		  | 
	
	
		| Back to top | 
		 | 
	
	
		  | 
	
	
		 |