25.05.2010, 15:09
Hello, I'm trying to create a GUI account system which will allow users to type information into the dialogues and thus saving them to a file. For this I am currently using Dini.
What the problem is, is I cannot set the age correctly without an error being displayed.
The code below goes under register which works fine.
The next part of code also works fine, but goes under login.
Next, is where the problem occurs. I cannot assign the age correctly as it displays an error in the compiler. If there is a way around this (maybe without PVars?) help would be appreciated.
This is the dialog where users are asked to enter their age in digits.
If it helps, I already tried setting the age with:
This is then displayed with the SetPVar:
EDIT: If there is an obvious mistake here, I haven't noticed it. I've been off and on scripting for a while now, just regaining my knowledge really, haha.
What the problem is, is I cannot set the age correctly without an error being displayed.
The code below goes under register which works fine.
pawn Code:
dini_IntSet(file, "Age", 0);
SetPVarInt(playerid, "Age", dini_Int(file, "Age"));
pawn Code:
SetPVarInt(playerid, "Age", dini_Int(file, "Age"));
This is the dialog where users are asked to enter their age in digits.
pawn Code:
if(dialogid == CHARAGE)
{
if(response == 1)
{
SetPVarInt(playerid, "Age", inputtext);
}
}
pawn Code:
SetPVarString(playerid, "Age", inputtext);
Code:
C:\Documents and Settings\-\Desktop\GTA San Andreas\SA-MP\samp03asvr_R7_win32\gamemodes\-.pwn(313) : error 035: argument type mismatch (argument 3)