20.07.2011, 18:48
Im getting so many problems with this could you please help:
this is the error:
Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
new Float:xaxis, Float:yaxis, Float:zaxis, Float:angle;
GetPlayerPos(playerid, xaxis, yaxis, zaxis);
GetPlayerFacingAngle(playerid, angle);
switch(dialogid)
{
case DIALOG_REGISTER:
{
if (!response) return Kick(playerid);
if (response)
{
if(!strlen(inputtext)) {
ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, ""WHITE"Registering",""RED"You have entered an invalid password.\n"WHITE"Type your password below to register a new account.","Register","Quit");
}
if(INI_Open(getINI(playerid))) {
INI_WriteString("Pass", inputtext);
//INI_WriteInt("Age", strval(inputtext));
INI_WriteInt("Cash", StartingCash);
INI_WriteInt("Score",1);
INI_WriteInt("Skin", 299);
INI_WriteInt("Kills", killer[playerid]);
INI_WriteInt("Deaths", died[playerid]);
//INI_WriteInt("Timeplayed", 0);
//INI_WriteString("Ipaddress", "NEEDS SETTING");
INI_WriteString("Savedpositionx", "361.8363");
INI_WriteString("Savedpositiony", "173.4745");
INI_WriteString("Savedpositionz", "1008.3828");
INI_WriteString("Savedpositiona", "90.2508");
INI_WriteInt("playersInterior", 3);
INI_WriteInt("playersVworld", 0);
INI_WriteInt("Admin", 0);
//INI_WriteInt("Faction", 0);
//INI_WriteInt("Faction", 0);
//INI_WriteInt("Bankdeposit", 0);
//INI_WriteInt("Banned", 0);
//INI_WriteString("Banreason", "");
//INI_WriteInt("House", 0);
//INI_WriteInt("Biz", 0);
//INI_WriteInt("Fightstyle", 0);
//INI_WriteInt("Walkstyle", 0);
//INI_WriteInt("TimesArrested", 0);
//INI_WriteInt("Drivinglicense", 0);
//INI_WriteInt("Flinglicense", 0);
//INI_WriteInt("Boatlicense", 0);
//INI_WriteInt("GunLicense", 0);
//INI_WriteInt("Car", 0);
//INI_WriteInt("Job", 0);
//INI_WriteInt("Earnings", 0);
INI_Save();
INI_Close();
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""WHITE"Login",""WHITE"Type your password below to login.","Login","Quit");
}
}
}
case DIALOG_LOGIN:
{
if (!response) return Kick ( playerid );
if(response)
{
if(!strlen(inputtext)) {
return ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT, ""WHITE"Login",""RED"You have entered an invalid password.\n"WHITE"Type your password below to login.","Login","Quit");
}
if(INI_Open(getINI(playerid))) {
INI_ReadString(PlayerInfo[playerid][Pass],"Pass",20);
if(strcmp(inputtext,PlayerInfo[playerid][Pass],false)) {
return ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT, ""WHITE"Login",""RED"You have entered an incorrect password.\n"WHITE"Type your password below to login.","Login","Quit");
}
new Float:x, Float:y, Float:z, Float:a;
SetPlayerScore(playerid, INI_ReadInt("Score"));
ResetPlayerMoney(playerid);
GivePlayerMoney(playerid, INI_ReadInt("Cash"));
PlayerInfo[playerid][Admin] = INI_ReadInt("Admin");
PlayerInfo[playerid][Skin] = INI_ReadInt("Skin");
x = INI_ReadFloat("Savedpositionx");
y = INI_ReadFloat("Savedpositiony");
z = INI_ReadFloat("Savedpositionz");
a = INI_ReadFloat("Savedpositiona");
SetPlayerInterior(playerid, INI_ReadInt("playersInterior"));
SetPlayerVirtualWorld(playerid, INI_ReadInt("playersVworld"));
SetSpawnInfo(playerid, 0, PlayerInfo[playerid][Skin], x, y, z, a, 0, 0, 0, 0, 0, 0);
SpawnPlayer(playerid);
INI_Close();
}
}
}
//DMV CODE!
case DIALOG_DMVCARTEST:
{
if(response)
{
SendClientMessage(playerid, COLOUR_YELLOW, "Welcome to you the DMV Licensing Center");
SendClientMessage(playerid, COLOUR_YELLOW, "We will now start your test please head outside");
SendClientMessage(playerid, COLOUR_YELLOW, "to the test car outside.");
CreateVehicle(404, 1424.6630, -1700.2382, 13.0871, 358.1393, 0, 0, 0);
}
else
{
SendClientMessage(playerid, COLOUR_YELLOW, "Come back soon, You'll be getting find if you drive without a license.");
}
}
///// 24/7 NOOBSPAWN
case DIALOG_NOOB247:
{
switch(listitem)
{
if(response == 1)
{
case 0:
{
if(GetPlayerMoney(playerid) < 10) return SendClientMessage(playerid, COLOUR_YELLOW, "You cant afford this item.");
GivePlayerMoney(playerid, -10);
}
case 1:
{
if(GetPlayerMoney(playerid) < 20) return SendClientMessage(playerid, COLOUR_YELLOW, "You cant afford this item.");
GivePlayerMoney(playerid, -20);
}
case 2:
{
if(GetPlayerMoney(playerid) < 30) return SendClientMessage(playerid, COLOUR_YELLOW, "You cant afford this item.");
GivePlayerMoney(playerid, -30);
}
case 3:
{
return SendClientMessage(playerid, COLOUR_YELLOW, "You cant afford this item.");
}
}
}
}
return 1;
}
Код:
C:\Users\mattt\Desktop\New\gamemodes\arrp.pwn(382) : warning 203: symbol is never used: "params" C:\Users\mattt\Desktop\New\gamemodes\arrp.pwn(401) : warning 203: symbol is never used: "params" C:\Users\mattt\Desktop\New\gamemodes\arrp.pwn(733) : error 002: only a single statement (or expression) can follow each "case" C:\Users\mattt\Desktop\New\gamemodes\arrp.pwn(733 -- 734) : error 029: invalid expression, assumed zero C:\Users\mattt\Desktop\New\gamemodes\arrp.pwn(735) : error 014: invalid statement; not in switch C:\Users\mattt\Desktop\New\gamemodes\arrp.pwn(735) : warning 215: expression has no effect C:\Users\mattt\Desktop\New\gamemodes\arrp.pwn(735) : error 001: expected token: ";", but found ":" C:\Users\mattt\Desktop\New\gamemodes\arrp.pwn(735) : error 029: invalid expression, assumed zero C:\Users\mattt\Desktop\New\gamemodes\arrp.pwn(735) : fatal error 107: too many error messages on one line


