udb_RenameUser Error! - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: udb_RenameUser Error! (
/showthread.php?tid=494429)
udb_RenameUser Error! -
FarCry - 13.02.2014
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?
Re: udb_RenameUser Error! -
Konstantinos - 13.02.2014
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;
}
Re: udb_RenameUser Error! -
FarCry - 13.02.2014
Thanks!
Re: udb_RenameUser Error! -
Sojo12 - 13.02.2014
Do like this:
new udb_RenameUser;(PlayerName(playerid),inputtext);
It will work
Re: udb_RenameUser Error! -
rakshith122 - 13.02.2014
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!