Započeo MEDO
•23. Jul 2012.[Pomoc]Only a singl statament
440
pregleda
6
postova
Kingpin
Balkan SA:MP
SA-MP Doprinos
Balkan SA:MP
SA-MP DoprinosNovi Član
241 / 250 XP
Početnik(0)
1,344
Postovi:
96
Teme:
Pridružio se:Jun 2012
23. Jul 2012.
Skripta koju koristim: DLRP
Detaljan opis problema: Posto sam imao problem sa dialogom poslova naravio sam da uzimaju posao komandaom /posao i izbrsiao sam dialog ali nesto ne radi izabujce ovaj error
Dio skripte:
Evo cijelih dialoga nema ih puno
error se desva u pred zadnioj lini ovo return 1; to jes u ovom zadnjem return 1;
Neke slike/video za lakse dobivanje pomoci(neobavezno):
Detaljan opis problema: Posto sam imao problem sa dialogom poslova naravio sam da uzimaju posao komandaom /posao i izbrsiao sam dialog ali nesto ne radi izabujce ovaj error
C:\Documents and Settings\medis\Desktop\mds\0\gamemodes\0.pwn(1065) : error 002: only a single statement (or expression) can follow each "case"Dio skripte:
Evo cijelih dialoga nema ih puno
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
switch( dialogid )
{
case DIALOG_REGISTER:
{
if (!response) return Kick(playerid);
if(response)
{
if(!strlen(inputtext)) return ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, ""COL_WHITE"Registracija",""COL_RED"Ukucali ste pogresan password.\n"COL_WHITE"Upisite password da registrujete vas racun.","Register","Quit");
new INI:File = INI_Open(UserPath(playerid));
INI_SetTag(File,"data");
INI_WriteInt(File,"Password",udb_hash(inputtext));
INI_WriteInt(File,"Novac",0);
INI_WriteInt(File,"Admin",0);
INI_WriteInt(File,"Zemlja",0);
INI_WriteInt(File,"Godine",0);
INI_WriteInt(File,"Posao",0);
INI_Close(File);
SetSpawnInfo(playerid, 0, 0, 671.40002441406, -457.89999389648, 16.5, 269.15, 0, 0, 0, 0, 0, 0);
SpawnPlayer(playerid);
}
}
case DIALOG_LOGIN:
{
if ( !response ) return Kick ( playerid );
if( response )
{
if(udb_hash(inputtext) == PlayerInfo)
{
INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
GivePlayerMoney(playerid, PlayerInfo);
SetSpawnInfo(playerid, 0, 0, 671.40002441406, -457.89999389648, 16.5, 269.15, 0, 0, 0, 0, 0, 0);
SpawnPlayer(playerid);
}
else
{
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""COL_WHITE"Login",""COL_RED"Ukucali ste pogresan password\n"COL_WHITE"Ukoliko 3 puta pogresis dobijas BAN.","Login","Izlaz");
}
return 1;
}
}
return 1;
}error se desva u pred zadnioj lini ovo return 1; to jes u ovom zadnjem return 1;
Neke slike/video za lakse dobivanje pomoci(neobavezno):
Hustler
Balkan SA:MP
SA-MP Doprinos
Balkan SA:MP
SA-MP DoprinosNovi Član
90 / 100 XP
Početnik(0)
95
Postovi:
36
Teme:
Pridružio se:Nov. 2011
23. Jul 2012.
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
switch( dialogid )
{
case DIALOG_REGISTER:
{
if(response)
{
if(!strlen(inputtext)) return ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, ""COL_WHITE"Registracija",""COL_RED"Ukucali ste pogresan password.\n"COL_WHITE"Upisite password da registrujete vas racun.","Register","Quit");
new INI:File = INI_Open(UserPath(playerid));
INI_SetTag(File,"data");
INI_WriteInt(File,"Password",udb_hash(inputtext));
INI_WriteInt(File,"Novac",0);
INI_WriteInt(File,"Admin",0);
INI_WriteInt(File,"Zemlja",0);
INI_WriteInt(File,"Godine",0);
INI_WriteInt(File,"Posao",0);
INI_Close(File);
SetSpawnInfo(playerid, 0, 0, 671.40002441406, -457.89999389648, 16.5, 269.15, 0, 0, 0, 0, 0, 0);
SpawnPlayer(playerid);
}
}
case DIALOG_LOGIN:
{
if( response )
{
if(udb_hash(inputtext) == PlayerInfo)
{
INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
GivePlayerMoney(playerid, PlayerInfo);
SetSpawnInfo(playerid, 0, 0, 671.40002441406, -457.89999389648, 16.5, 269.15, 0, 0, 0, 0, 0, 0);
SpawnPlayer(playerid);
}
else
{
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""COL_WHITE"Login",""COL_RED"Ukucali ste pogresan password\n"COL_WHITE"Ukoliko 3 puta pogresis dobijas BAN.","Login","Izlaz");
}
return 1;
}
}
return 1;
}Shot Caller
Balkan SA:MP
SA-MP Doprinos
Balkan SA:MP
SA-MP DoprinosNovi Član
40 / 100 XP
Početnik(0)
105
Postovi:
2
Teme:
Pridružio se:Jul 2012
24. Jul 2012.
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
switch( dialogid )
{
case DIALOG_REGISTER:
{
if (!response) return Kick(playerid);
if(!strlen(inputtext)) return ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, ""COL_WHITE"Registracija",""COL_RED"Ukucali ste pogresan password.\n"COL_WHITE"Upisite password da registrujete vas racun.","Register","Quit");
new INI:File = INI_Open(UserPath(playerid));
INI_SetTag(File,"data");
INI_WriteInt(File,"Password",udb_hash(inputtext));
INI_WriteInt(File,"Novac",0);
INI_WriteInt(File,"Admin",0);
INI_WriteInt(File,"Zemlja",0);
INI_WriteInt(File,"Godine",0);
INI_WriteInt(File,"Posao",0);
INI_Close(File);
SetSpawnInfo(playerid, 0, 0, 671.40002441406, -457.89999389648, 16.5, 269.15, 0, 0, 0, 0, 0, 0);
SpawnPlayer(playerid);
}
case DIALOG_LOGIN:
{
if ( !response ) return Kick ( playerid );
if(udb_hash(inputtext) == PlayerInfo)
{
INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
GivePlayerMoney(playerid, PlayerInfo);
SetSpawnInfo(playerid, 0, 0, 671.40002441406, -457.89999389648, 16.5, 269.15, 0, 0, 0, 0, 0, 0);
SpawnPlayer(playerid);
}
else
{
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""COL_WHITE"Login",""COL_RED"Ukucali ste pogresan password\n"COL_WHITE"Ukoliko 3 puta pogresis dobijas BAN.","Login","Izlaz");
}
}
}
return 1;
}
Morate biti prijavljeni da biste odgovorili na ovu temu.
Prijava