pls guys help me
Script:
Errori
Script:
PHP Code:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
switch (dialogid)
{
case DIALOG_ARMI:
{
if (response)
{
switch (listitem)
{
case 0:
{
if (GetPlayerMoney(playerid) < 1000) return SendClientMessage(playerid, 0xAA3333AA, "Non hai abbastanza denaro.!");
SendClientMessage(playerid, 0xAA3333AA, "Hai comprato un'AK47!");
GivePlayerMoney(playerid, -1000);
GivePlayerWeapon(playerid, 30, 100);
}
case 1:
{
if (GetPlayerMoney(playerid) < 1000) return SendClientMessage(playerid, 0xAA3333AA, "Non hai abbastanza denaro.!");
SendClientMessage(playerid, 0xAA3333AA, "Hai comprato una M4!");
GivePlayerMoney(playerid, -1000);
GivePlayerWeapon(playerid, 31, 100);
}
case 2:
{
if (GetPlayerMoney(playerid) < 1000) return SendClientMessage(playerid, 0xAA3333AA, "Non hai abbastanza denaro.!");
SendClientMessage(playerid, 0xAA3333AA, "Hai comprato una desert eagle!");
GivePlayerMoney(playerid, -1000);
GivePlayerWeapon(playerid, 24, 100);
}
}
}
}
case DIALOG_DROGA:
{
if (response)
{
switch (listitem)
{
case 0:
{
if (GetPlayerMoney(playerid) < 1000) return SendClientMessage(playerid, 0xAA3333AA, "Non hai abbastanza denaro.!");
SendClientMessage(playerid, 0xAA3333AA, "Hai comprato la Marijuana!");
GivePlayerMoney(playerid, -1000);
}
case 1:
{
if (GetPlayerMoney(playerid) < 1000) return SendClientMessage(playerid, 0xAA3333AA, "Non hai abbastanza denaro.!");
SendClientMessage(playerid, 0xAA3333AA, "Hai comprato la metanfetamina!");
GivePlayerMoney(playerid, -1000);
}
case 2:
{
if (GetPlayerMoney(playerid) < 1000) return SendClientMessage(playerid, 0xAA3333AA, "Non hai abbastanza denaro.!");
SendClientMessage(playerid, 0xAA3333AA, "Hai comprato la cocaina!");
GivePlayerMoney(playerid, -1000);
}
default: return 0; // dialogid non è stato trovato,lo cerca in un altro script
}
}
}
case DIALOG_REGISTRAZIONE:
{
if (!response) return Kick(playerid);
if(response)
{
if(!strlen(inputtext)) return ShowPlayerDialog(playerid, DIALOG_REGISTRAZIONE, DIALOG_STYLE_INPUT,""COL_WHITE"Registrazione...",""COL_RED"Hai inserito una password errata.\n"COL_WHITE"Inserisci una password per creare un account.","Registrati","Esci");
new INI:File = INI_Open(UserPath(playerid));
INI_SetTag(File,"data");
INI_WriteInt(File,"Password",udb_hash(inputtext));
INI_WriteInt(File,"Soldi",0);
INI_WriteInt(File,"Admin",0);
INI_WriteInt(File,"Uccisioni",0);
INI_WriteInt(File,"Morti",0);
INI_Close(File);
SetSpawnInfo(playerid, 0, 0, 1958.33, 1343.12, 15.36, 269.15, 0, 0, 0, 0, 0, 0);
SpawnPlayer(playerid);
ShowPlayerDialog(playerid, DIALOG_SUCCESSO_1, DIALOG_STYLE_MSGBOX,""COL_WHITE"Sei loggato!",""COL_GREEN"Buono! Il Sistema Y_INI funziona corettamente. Rilogga per aggiornare il tuo stato!","Ok","");
SetCameraBehindPlayer(playerid);
}
}
case DIALOG_LOGIN:
{
if ( !response ) return Kick ( playerid );
if( response )
{
if(udb_hash(inputtext) == PlayerInfo[playerid][pPassword])
{
INI_ParseFile(UserPath(playerid ), "LoadUser_%s", .bExtra = true, .extra = playerid);
GivePlayerMoney(playerid, PlayerInfo[playerid][pSoldi]);
ShowPlayerDialog(playerid, DIALOG_SUCCESSO_2, DIALOG_STYLE_MSGBOX,""COL_WHITE"Successo!",""COL_GREEN"Sei loggato!","Ok","");
}
else
{
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""COL_WHITE"Logga",""COL_RED"Hai inserito una password errata.\n"COL_WHITE"Inserisci una password.","Login","Esci");
}
}
}
}
return 1; // dialogid è stato trovato
}
{
if(response)
{
switch(dialogid)
{
case 1:
{
switch(listitem)
{
case 0:
{
new Float:X;
new Float:Y;
new Float:Z;
GetPlayerPos(playerid,X,Y,Z);
CreateVehicle(451,X,Y+5,Z,1,1,1,90000);
}
case 1:
{
new Float:X;
new Float:Y;
new Float:Z;
GetPlayerPos(playerid,X,Y,Z);
CreateVehicle(411,X,Y+5,Z,1,1,1,90000);
}
case 2:
{
new Float:X;
new Float:Y;
new Float:Z;
GetPlayerPos(playerid,X,Y,Z);
CreateVehicle(541,X,Y+5,Z,1,1,1,90000);
}
case 3:
{
new Float:X;
new Float:Y;
new Float:Z;
GetPlayerPos(playerid,X,Y,Z);
CreateVehicle(567,X,Y+5,Z,1,1,1,90000);
}
}
}
}
return 1;
}
}
PHP Code:
C:\Users\Kevin11\Desktop\Freeroam da 0\gamemodes\Freeroam.pwn(545) : error 055: start of function body without function header
C:\Users\Kevin11\Desktop\Freeroam da 0\gamemodes\Freeroam.pwn(546) : error 010: invalid function or declaration
C:\Users\Kevin11\Desktop\Freeroam da 0\gamemodes\Freeroam.pwn(548) : error 010: invalid function or declaration
C:\Users\Kevin11\Desktop\Freeroam da 0\gamemodes\Freeroam.pwn(550) : error 010: invalid function or declaration
C:\Users\Kevin11\Desktop\Freeroam da 0\gamemodes\Freeroam.pwn(552) : error 010: invalid function or declaration
C:\Users\Kevin11\Desktop\Freeroam da 0\gamemodes\Freeroam.pwn(554) : error 010: invalid function or declaration
C:\Users\Kevin11\Desktop\Freeroam da 0\gamemodes\Freeroam.pwn(559) : error 021: symbol already defined: "GetPlayerPos"
C:\Users\Kevin11\Desktop\Freeroam da 0\gamemodes\Freeroam.pwn(562) : error 010: invalid function or declaration
C:\Users\Kevin11\Desktop\Freeroam da 0\gamemodes\Freeroam.pwn(564) : error 021: symbol already defined: "X"
C:\Users\Kevin11\Desktop\Freeroam da 0\gamemodes\Freeroam.pwn(565) : error 021: symbol already defined: "Y"
C:\Users\Kevin11\Desktop\Freeroam da 0\gamemodes\Freeroam.pwn(566) : error 021: symbol already defined: "Z"
C:\Users\Kevin11\Desktop\Freeroam da 0\gamemodes\Freeroam.pwn(570) : error 010: invalid function or declaration
C:\Users\Kevin11\Desktop\Freeroam da 0\gamemodes\Freeroam.pwn(572) : error 021: symbol already defined: "X"
C:\Users\Kevin11\Desktop\Freeroam da 0\gamemodes\Freeroam.pwn(573) : error 021: symbol already defined: "Y"
C:\Users\Kevin11\Desktop\Freeroam da 0\gamemodes\Freeroam.pwn(574) : error 021: symbol already defined: "Z"
C:\Users\Kevin11\Desktop\Freeroam da 0\gamemodes\Freeroam.pwn(578) : error 010: invalid function or declaration
C:\Users\Kevin11\Desktop\Freeroam da 0\gamemodes\Freeroam.pwn(580) : error 021: symbol already defined: "X"
C:\Users\Kevin11\Desktop\Freeroam da 0\gamemodes\Freeroam.pwn(581) : error 021: symbol already defined: "Y"
C:\Users\Kevin11\Desktop\Freeroam da 0\gamemodes\Freeroam.pwn(582) : error 021: symbol already defined: "Z"
C:\Users\Kevin11\Desktop\Freeroam da 0\gamemodes\Freeroam.pwn(589) : error 010: invalid function or declaration
C:\Users\Kevin11\Desktop\Freeroam da 0\gamemodes\Freeroam.pwn(601) : warning 203: symbol is never used: "X"
C:\Users\Kevin11\Desktop\Freeroam da 0\gamemodes\Freeroam.pwn(601) : warning 203: symbol is never used: "Y"
C:\Users\Kevin11\Desktop\Freeroam da 0\gamemodes\Freeroam.pwn(601) : warning 203: symbol is never used: "Z"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
20 Errors.