Need Help!
#1

I:\Games\RockStar Game Gta San Andreas\Gta Sanandreas\My Script\gamemodes\My Script.pwn(531) : error 017: undefined symbol "playername"
I:\Games\RockStar Game Gta San Andreas\Gta Sanandreas\My Script\gamemodes\My Script.pwn(531) : error 017: undefined symbol "playername"
I:\Games\RockStar Game Gta San Andreas\Gta Sanandreas\My Script\gamemodes\My Script.pwn(531) : error 029: invalid expression, assumed zero
I:\Games\RockStar Game Gta San Andreas\Gta Sanandreas\My Script\gamemodes\My Script.pwn(531) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


4 Errors.
what's the problem

new giveplayername[MAX_PLAYER_NAME];

GetPlayerName(playerid, playername, sizeof(playername));

if(strcmp(cmd, "/register", true) == 0) //players ingame stats
{
if (!dini_Exists(udb_encode(playername)))
{
ShowPlayerDialog(playerid,50,DIALOG_STYLE_INPUT,"R egister","Welcome to the server\n\nPlease open a new account\n\nEnter a password:","Register","Quit");
}
else
{
SendClientMessage(playerid, COLOR_GREY, "You already have a registered account!");
}
return 1;
}
Reply
#2

You have the name variable defined as "giveplayername" but you use it as "playername".
Use this:
pawn Код:
new playername[MAX_PLAYER_NAME];
Reply
#3

Giving this

I:\Games\RockStar Game Gta San Andreas\Gta Sanandreas\My Script\gamemodes\My Script.pwn(532) : warning 217: loose indentation
I:\Games\RockStar Game Gta San Andreas\Gta Sanandreas\My Script\gamemodes\My Script.pwn(532) : error 017: undefined symbol "cmd"
I:\Games\RockStar Game Gta San Andreas\Gta Sanandreas\My Script\gamemodes\My Script.pwn(534) : error 017: undefined symbol "dini_Exists"
I:\Games\RockStar Game Gta San Andreas\Gta Sanandreas\My Script\gamemodes\My Script.pwn(545) : warning 217: loose indentation
I:\Games\RockStar Game Gta San Andreas\Gta Sanandreas\My Script\gamemodes\My Script.pwn(545) : error 017: undefined symbol "cmd"
I:\Games\RockStar Game Gta San Andreas\Gta Sanandreas\My Script\gamemodes\My Script.pwn(547) : error 017: undefined symbol "logged"
I:\Games\RockStar Game Gta San Andreas\Gta Sanandreas\My Script\gamemodes\My Script.pwn(547) : warning 215: expression has no effect
I:\Games\RockStar Game Gta San Andreas\Gta Sanandreas\My Script\gamemodes\My Script.pwn(547) : error 001: expected token: ";", but found "]"
I:\Games\RockStar Game Gta San Andreas\Gta Sanandreas\My Script\gamemodes\My Script.pwn(547) : error 029: invalid expression, assumed zero
I:\Games\RockStar Game Gta San Andreas\Gta Sanandreas\My Script\gamemodes\My Script.pwn(547) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


7 Errors.


when i made it like this


new playername[MAX_PLAYER_NAME];

GetPlayerName(playerid, playername, sizeof(playername));
if(strcmp(cmd, "/register", true) == 0) //players ingame stats
{
if (!dini_Exists(udb_encode(playername)))
{
ShowPlayerDialog(playerid,50,DIALOG_STYLE_INPUT,"R egister","Welcome to the server\n\nPlease open a new account\n\nEnter a password:","Register","Quit");
}
else
{
SendClientMessage(playerid, COLOR_GREY, "You already have a registered account!");
}
return 1;
}

if i am doing something wrong can you Post script here?
Reply
#4

change the cmd in "if(strcmp(cmd, "/register", true) == 0)" to cmdtext
then the others are indentation warnings so either indent your code or put at the top of you script
#pragma tabsize 0

that should fix them all i would sugest indenting it over using the tabsize option as it makes the code a hell of a lot easer to read but up to you
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)