10.08.2011, 13:50
I am trying to make a callsign system for my flying server. Here is the code of which the errors are located in.
Here are the errors:
Any help?
pawn Код:
if (dialogid == RegisterDialog)
{
new name[MAX_PLAYER_NAME], file[256], string[128], WelcomeMessage[128];
GetPlayerName(playerid, name, sizeof(name));
format(file, sizeof(file), UserFile, name);
if(!response) return Kick(playerid);
if (!strlen(inputtext)) return
ShowPlayerDialog(playerid, RegisterDialog, DIALOG_STYLE_INPUT, "Register", "Your account was not found on the database!\n Please make one to continue!", "Register", "Leave");
dini_Create(file);
dini_IntSet(file, "Password", udb_hash(inputtext));
dini_IntSet(file, "AdminLevel",PlayerInfo[playerid][AdminLevel] = 0);
dini_IntSet(file, "Money", 0);
dini_IntSet(file, "Score", 0);
dini_IntSet(file, "Callsign", name); //First Error
format(string, sizeof(string), "You have registered the name {FFFF00}%s{FFFFFF} under the password {FFFF00}%s{FFFFFF}.", name, inputtext);
SendClientMessage(playerid, COLOR_WHITE, string);
gPlayerLogged[playerid] = 1;
format(WelcomeMessage, sizeof(WelcomeMessage), "%s(%d) has joined the server for the first time!", name, playerid);
SendClientMessageToAll(COLOR_BLUE, WelcomeMessage);
ShowPlayerDialog(playerid, ClassDialog, DIALOG_STYLE_LIST, "Select a class", "Pilot\nAir Trafic Controll\nMedic\nSan Andreas Army", "Select", "");
}
pawn Код:
else if(dialogid == CallsignDialog)
{
if(!response) return HidePlayerDialog(playerid);
else {
new Message[128];
PlayerInfo[playerid][Callsign] = inputtext; //second error
format(Message, sizeof(Message), "You have changed your callsign to: {FFFF00}%s", inputtext);
SendClientMessage(playerid, COLOR_WHITE, Message);
}
}
Код:
C:\Documents and Settings\Ed\My Documents\SA-MP Virtual Pilots\Server\gamemodes\VirtualPilots.pwn(178) : error 035: argument type mismatch (argument 3) C:\Documents and Settings\Ed\My Documents\SA-MP Virtual Pilots\Server\gamemodes\VirtualPilots.pwn(351) : error 006: must be assigned to an array Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 2 Errors.