ID:263834
 
Code:
#include <dantom/htmllib>

//*********************Millenia Abuse Guard V1.0*********************

mob/var/RandNumberMatch
mob/var/RandNumber
Form
EZDetector
form_reusable=0
form_window="size=500x500"
var
RandNumber
RandNumberMatch
RandNumberMatch_Size=3
ProcessForm()
usr.RandNumberMatch=RandNumberMatch
usr.RandNumber=RandNumber
if(usr.RandNumber!=usr.RandNumberMatch)
usr<<"Millenia Guard AI: You have entered numbers that do not match the EZ detector code. You will be disconected from the server. The numbers were: [usr.RandNumber]. The numbers you entered were: [usr.RandNumberMatch]. If you wish you can log back on."
spawn(10)
del(usr)
else
usr<<"Millenia Guard AI: You have entered the correct numbers. Thank you. You may continue playing. (:"
HtmlLayout()
return \
{"

<center>Please enter the following number to confirm you are not ezing:
[RandNumber]<br />
<br />
[RandNumberMatch]
<br />
[submit]
"}


mob
proc
EZ_Guard()
var/Form/EZDetector/A=new()

var/RandNumber=rand(100,999)
var/RandNumberMatch

A.RandNumber=RandNumber
A.RandNumberMatch=RandNumberMatch

A.DisplayForm()
spawn(10000)
src.EZ_Guard()
mob
verb
Test_EZ()
src.EZ_Guard()


Problem description:It compiles with 0 errors but when the user enters the correct number it still logs them out saying they entered a incorrect number. I made it say the numbers for bothe the code needed to be entered and the numbers the user entered for debuggin purposes but I still see no error in why this is happening.

You are comparing a text value to a number. The 'numbers' you are entering into that form are being sent to the RandNumberMatch var as text. Look up the 'text2num()' proc.