A strange problem with registration system! [REP]
#1

Hey everyone.

Today I got help with my registration system by an awesome guy and when I he fixed a bit I tried to make a new dialog called origin where they can write in where they are from. But I got some strange issues and have no clue what it can be so I am asking you guys, can you see what's wrong here?

pawn Код:
case DIALOG_AGE:
        {
            if(!response || response == 2) return Kick(playerid);

            else
            {
                new age = strval(inputtext);
                if(age >= 18 && age <= 80)
                {
                    PlayerInfo[playerid][pAge] = age;
LINE 1296:                  ShowPlayerDialog(playerid, DIALOG_ORIGIN, DIALOG_STYLE_INPUT, ""COLOR_GREY1"Origin Selection", "Please input your country of origin in the box below.",
                }
LINE 1298:              else ShowPlayerDialog(playerid, DIALOG_AGE, DIALOG_STYLE_INPUT, ""COLOR_GREY1"Age Selection", "Please input your desired character age in the box below.\n(18-80)", "Select", "Cancel");
            }
        }
           
        case DIALOG_ORIGIN:
Errors:
Quote:

(1296 -- 1297) : error 029: invalid expression, assumed zero
(1296 -- 1298) : error 035: argument type mismatch (argument 6)
(1298) : warning 217: loose indentation
(1298) : error 029: invalid expression, assumed zero
(1298) : fatal error 107: too many error messages on one line

Anyone?
Reply
#2

pawn Код:
ShowPlayerDialog(playerid, DIALOG_ORIGIN, DIALOG_STYLE_INPUT, ""COLOR_GREY1"Origin Selection", "Please input your country of origin in the box below.",
You did not finished the line.
pawn Код:
ShowPlayerDialog(playerid, DIALOG_ORIGIN, DIALOG_STYLE_INPUT, ""COLOR_GREY1"Origin Selection", "Please input your country of origin in the box below.", "Choose", "Cancel");

EDIT:
I edited your code a bit.. this is how i would do it.
pawn Код:
{
            if(response)
            {
                new age = strval(inputtext);
                if(age <= 18 && age >= 80) return ShowPlayerDialog(playerid, DIALOG_AGE, DIALOG_STYLE_INPUT, ""COLOR_GREY1"Age Selection", "Please input your desired character age in the box below.\n(18-80)", "Select", "Cancel");
                PlayerInfo[playerid][pAge] = age;
                ShowPlayerDialog(playerid, DIALOG_ORIGIN, DIALOG_STYLE_INPUT, ""COLOR_GREY1"Origin Selection", "Please input your country of origin in the box below.","Choose", "Cancel");
            }
            else Kick(playerid)
        }
Reply
#3

Quote:
Originally Posted by Facerafter
Посмотреть сообщение
pawn Код:
ShowPlayerDialog(playerid, DIALOG_ORIGIN, DIALOG_STYLE_INPUT, ""COLOR_GREY1"Origin Selection", "Please input your country of origin in the box below.",
You did not finished the line.
pawn Код:
ShowPlayerDialog(playerid, DIALOG_ORIGIN, DIALOG_STYLE_INPUT, ""COLOR_GREY1"Origin Selection", "Please input your country of origin in the box below.", "Choose", "Cancel");

EDIT:
I edited your code a bit.. this is how i would do it.
pawn Код:
{
            if(response)
            {
                new age = strval(inputtext);
                if(age <= 18 && age >= 80) return ShowPlayerDialog(playerid, DIALOG_AGE, DIALOG_STYLE_INPUT, ""COLOR_GREY1"Age Selection", "Please input your desired character age in the box below.\n(18-80)", "Select", "Cancel");
                PlayerInfo[playerid][pAge] = age;
                ShowPlayerDialog(playerid, DIALOG_ORIGIN, DIALOG_STYLE_INPUT, ""COLOR_GREY1"Origin Selection", "Please input your country of origin in the box below.","Choose", "Cancel");
            }
            else Kick(playerid)
        }
I have tried that, made me get a bunch of errors.

error 001: expected token: ",", but found ";" look there, mate.'


Nevermind, probably solved. Standby.
Reply
#4

Bump as something new came up.

pawn Код:
Line 1246: format(PlayerInfo[playerid][pPassword], 256, udb_hash(inputtext));
Line 1316: INI_WriteString(File, "Password", udb_hash(inputtext), 256);
What is wrong with these two codes?

Errors:
Quote:

(1246) : error 035: argument type mismatch (argument 3)
(1316) : error 035: argument type mismatch (argument 3)
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


2 Errors.

Reply
#5

pawn Код:
format(PlayerInfo[playerid][pPassword], 256, udb_hash(inputtext));
INI_WriteString(File, "Password", udb_hash(inputtext));
You do not need a length on INI_WriteString, only INI_String.
Reply
#6

Quote:
Originally Posted by 2KY
Посмотреть сообщение
pawn Код:
format(PlayerInfo[playerid][pPassword], 256, udb_hash(inputtext));
INI_WriteString(File, "Password", udb_hash(inputtext));
You do not need a length on INI_WriteString, only INI_String.
Only INI_String?
pawn Код:
LINE 103: INI_String("Password",PlayerInfo[playerid][pPassword], 256);
Got these errors:

Quote:

(103) : error 001: expected token: ")", but found "["
(103) : warning 215: expression has no effect
(103) : error 001: expected token: ";", but found "]"
(103) : error 029: invalid expression, assumed zero
(103) : fatal error 107: too many error messages on one line

Reply
#7

Quote:
Originally Posted by Hargrave
Посмотреть сообщение
Only INI_String?
pawn Код:
LINE 103: INI_String("Password",PlayerInfo[playerid][pPassword], 256);
Got these errors:
Where is that located? (What's line 103 in?)
Reply
#8

Quote:
Originally Posted by 2KY
Посмотреть сообщение
Where is that located? (What's line 103 in?)
Actually it's just underneath the enum.

pawn Код:
forward LoadUser_data(playerid,name[],value[]);
public LoadUser_data(playerid,name[],value[])
{
    INI_String("Password",PlayerInfo[playerid][pPassword], 256);
    INI_Int("Cash",PlayerInfo[playerid][pCash]);
    INI_Int("VIP",PlayerInfo[playerid][pVIP]);
    INI_Int("Age",PlayerInfo[playerid][pAge]);
    INI_Int("Sex",PlayerInfo[playerid][pSex]);
    INI_Int("Origin",PlayerInfo[playerid][pOrigin]);
    INI_Int("Banned",PlayerInfo[playerid][pBanned]);
    INI_Int("Warns",PlayerInfo[playerid][pWarns]);
    INI_Int("Muted",PlayerInfo[playerid][pMuted]);
    INI_Int("MuteTime",PlayerInfo[playerid][pMuteTime]);
    INI_Int("Admin",PlayerInfo[playerid][pAdmin]);
    INI_Int("Kills",PlayerInfo[playerid][pKills]);
    INI_Int("Model",PlayerInfo[playerid][pModel]);
    INI_Int("Level",PlayerInfo[playerid][pLevel]);
    INI_Int("Experience",PlayerInfo[playerid][pExp]);
    INI_Int("Faction",PlayerInfo[playerid][pFaction]);
    INI_Int("Rank",PlayerInfo[playerid][pRank]);
    INI_Int("Phonenumber",PlayerInfo[playerid][pNumber]);
    INI_Int("Deaths",PlayerInfo[playerid][pDeaths]);
    return 1;
}
Reply
#9

Quote:
Originally Posted by Hargrave
Посмотреть сообщение
Actually it's just underneath the enum.

pawn Код:
forward LoadUser_data(playerid,name[],value[]);
public LoadUser_data(playerid,name[],value[])
{
    INI_String("Password",PlayerInfo[playerid][pPassword], 256);
    INI_Int("Cash",PlayerInfo[playerid][pCash]);
    INI_Int("VIP",PlayerInfo[playerid][pVIP]);
    INI_Int("Age",PlayerInfo[playerid][pAge]);
    INI_Int("Sex",PlayerInfo[playerid][pSex]);
    INI_Int("Origin",PlayerInfo[playerid][pOrigin]);
    INI_Int("Banned",PlayerInfo[playerid][pBanned]);
    INI_Int("Warns",PlayerInfo[playerid][pWarns]);
    INI_Int("Muted",PlayerInfo[playerid][pMuted]);
    INI_Int("MuteTime",PlayerInfo[playerid][pMuteTime]);
    INI_Int("Admin",PlayerInfo[playerid][pAdmin]);
    INI_Int("Kills",PlayerInfo[playerid][pKills]);
    INI_Int("Model",PlayerInfo[playerid][pModel]);
    INI_Int("Level",PlayerInfo[playerid][pLevel]);
    INI_Int("Experience",PlayerInfo[playerid][pExp]);
    INI_Int("Faction",PlayerInfo[playerid][pFaction]);
    INI_Int("Rank",PlayerInfo[playerid][pRank]);
    INI_Int("Phonenumber",PlayerInfo[playerid][pNumber]);
    INI_Int("Deaths",PlayerInfo[playerid][pDeaths]);
    return 1;
}
Does "pPassword" have a length of 256? I'm not seeing any unclosed ['s or )'s.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)