Save dialog input for later use? -
oliverrud - 06.06.2010
Okay so heres my issue, had a post earlier but thought it would be best to just recreate a new one and describe my issue better.
My issue is following:
I want to save a inputtext for a later mysql query.
I've now been trying for the last hours with no success.
The following code is what I'm using:
Here I'm trying to find a bank by using the WHERE and then password, this is where the issue is: It doesn't save proberly with GetPVarString/SetPVarString, It seems to only use 4 letter which is 'T', If I have a code with like 1337 then it would output '4'
pawn Код:
format(string,128,"UPDATE `bank` SET `Amount`='%s' WHERE `Password`='%s'",inputtext,GetPVarString(playerid,"BankSavePass",string,300));
This is what I use to store the information before taking it onto the mysql query.
pawn Код:
format(string,128,"%s",inputtext);
SetPVarString(playerid,"BankSavePass",string);
Re: Save dialog input for later use? -
saiberfun - 06.06.2010
just make a variable to store it in :P
new myvariabletostorein[255] = inputtext;
^^
[255] should be the maximum of the inputtext
for example if you only want the 15 first characters of the inputtext it would be [15] instead^^
Re: Save dialog input for later use? -
oliverrud - 06.06.2010
Well I don't think It will work, first of all, the new thing will only be in the select area like let me show you:
pawn Код:
{
new BankSavePass[128] = inputtext;
BankData[playerid][bLogged] = true;
SendClientMessage(playerid,COLOR_YELLOW,"You have logged into a bank account");
}
That's one of the parts of the script (this is the location where I want it stored from to the another location)
This is the "another location"
pawn Код:
format(string,128,"UPDATE `bank` SET `Amount`='%s' WHERE `Password`='%s'",inputtext,BankSavePass);
This gives two errors:
Код:
error 017: undefined symbol "BankSavePass"
Above: Reason is because they aren't in same uhm got no clue what they are called but I call them areas right now
Like both codes aren't inside
pawn Код:
{
//Not both codes are here
}
Other error is:
Код:
must be a constant expression; assumed zero
Re: Save dialog input for later use? -
oliverrud - 06.06.2010
Nobody who can help me out? Comeon there gotta be someway!