udb_RenameUser Error!
#1

Hello folks!
I am getting some errors:
The errors are as follows, error 017: undefined symbol "udb_RenameUser"
The line:
Код:
if(dialogid == DIALOG_CHANGENAME)
    {
        if (response == 0)
	    {
			return 1;
	    }
	    if (response == 1)
	    {
            if (strlen(inputtext)==0)
			{
		        SendClientMessage(playerid,COLOR_ERROR,"Please enter your desired name in the box.");
                ShowChangeNameScreen(playerid);
				return 1;
			}
            udb_RenameUser(PlayerName(playerid),inputtext);
            SetPlayerName(playerid,inputtext);
            format(string,sizeof(string),"You have successfully changed your name to '%s', use this to login from now on.",inputtext);
			SendClientMessage(playerid,COLOR_LIGHTBLUE,string);
            return true;
	    }
	    return 1;
    }
	return 1;
}
Check the slight bold text, it's that line.
And the other error is with SFCRRPGdudb.
This is the error
Quote:

C:\Users\Admin\Desktop\SFCRRPG\pawno\include\SFCRR PGdudb.inc(37) : warning 217: loose indentation

This is because of the include. Can you please provide me the suitable include file?
Reply
#2

udb_RenameUser can be found in dudb.inc so including it will remove the error. About the warning, learn to index your code properly. You don't need to check if the response is 0 to return a value, it will be returned anyways.
pawn Код:
if (dialogid == DIALOG_CHANGENAME)
{
    if (response)
    {
        if (!strlen(inputtext))
        {
            SendClientMessage(playerid,COLOR_ERROR,"Please enter your desired name in the box.");
            ShowChangeNameScreen(playerid);
            return 1;
        }
        udb_RenameUser(PlayerName(playerid),inputtext);
        SetPlayerName(playerid,inputtext);
        format(string,sizeof(string),"You have successfully changed your name to '%s', use this to login from now on.",inputtext);
        SendClientMessage(playerid,COLOR_LIGHTBLUE,string);
    }
    return 1;
}
Reply
#3

Thanks!
Reply
#4

Do like this:
new udb_RenameUser;(PlayerName(playerid),inputtext);
It will work
Reply
#5

Sojo, He had a warning with his include and i helped him fix it, you cant just copy a post from "SFCRRPG" topic and post it here as you did.
Just saying,
- No arguments, I'm leaving this!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)