Dialog problem /cars -
Sn4ke2 - 19.01.2015
Hi, guys, i'm From Romanian so sorry for my bad english !
My problem is:
I make a dialog comand when a player type /cars to show a dialog with some otions ( lock / park / spawn etc)
But you know every time is a problem !
I take some Errors
The Dialog :
Код:
if(dialogid == 8765)// dialog masini
{
new query[ 4048 ];
new carid[ 4049 ];
new text[ 4050 ];
if(!response)
{
SendClientMessage(playerid, 0xFF0000FF, "Ai anulat.");
return 1; // We processed it
}
switch(listitem)
{
case 0:
{
new text[512];
format(text, sizeof(text),"Lock\nAlege chei\n", "Alege", "Anulare");
ShowPlayerDialog(playerid,8766,DIALOG_STYLE_LIST, "Slot 1:", text, "Alege","Anulare");
}
case 1:
{
new text[512];
format(text, sizeof(text),"Lock\nAlege chei\n", "Alege", "Anulare");
ShowPlayerDialog(playerid,8767,DIALOG_STYLE_LIST, "Slot 2:", text, "Alege","Anulare");
}
case 2:
{
ShowPlayerDialog(playerid, 8768, DIALOG_STYLE_LIST, "Slot 3:", "Lock\nAlege chei\n", "Alege", "Anulare");
}
}
}
if((dialogid == 8766) || (dialogid == 8767) || (dialogid == 8768))
{
if(!response)
{
SendClientMessage(playerid, 0xFF0000FF, "Ai anulat.");
return 1; // We processed it
}
if(dialogid == 8766)
{
if(PlayerData[playerid][pPcarkey] == 999)
{
SendClientMessage(playerid, 0xFF0000FF, "Nu ai o masina pe acest slot.");
return 1; // We processed it
}
switch(listitem)
{
case 0:
{
new query[128];
if(SwitchKey[playerid] == 1)
{
new carid = PlayerData[playerid][pPcarkey];
if(CarData[carid][cLockk] == 0)
{
SendClientMessage(playerid, COLOR_GRAD1, "Masina personala a fost incuiata.");
PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
CarData[carid][cLockk] = 1;
VehLocked[carid+PreVehicle] = 1;
GetVehicleParamsEx(carid+PreVehicle,engine,lights,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(carid+PreVehicle,engine,lights,alarm,1,bonnet,boot,objective);
format(query, sizeof(query), "UPDATE cars SET Lockk='%d' WHERE id=%d",CarData[carid][cLockk], carid);
mysql_query(query);
return 1;
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "Masina personala a fost descuiata.");
PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
CarData[carid][cLockk] = 0;
VehLocked[carid+PreVehicle] = 0;
GetVehicleParamsEx(carid+PreVehicle,engine,lights,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(carid+PreVehicle,engine,lights,alarm,0,bonnet,boot,objective);
format(query, sizeof(query), "UPDATE cars SET Lockk='%d' WHERE id=%d", CarData[carid][cLockk], carid);
mysql_query(query);
return 1;
}
}
}
case 1:
{
if(PlayerData[playerid][pPcarkey] != 999 && PlayerData[playerid][pPcarkey] != 0)
{
SwitchKey[playerid] = 1;
SendClientMessage(playerid, COLOR_GRAD1, "Acum controlezi masina personala");
return 1;
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "Server: Nu detii masina personala!");
SwitchKey[playerid] = 1;
return 1;
}
}
}
}
}
And the Errors :
Код:
C:\Documents and Settings\John\Desktop\RealGaming\SERVER\gamemodes\RealGaming.pwn(20599) : error 010: invalid function or declaration
C:\Documents and Settings\John\Desktop\RealGaming\SERVER\gamemodes\RealGaming.pwn(20605) : error 010: invalid function or declaration
C:\Documents and Settings\John\Desktop\RealGaming\SERVER\gamemodes\RealGaming.pwn(20608) : error 010: invalid function or declaration
C:\Documents and Settings\John\Desktop\RealGaming\SERVER\gamemodes\RealGaming.pwn(20610) : error 010: invalid function or declaration
C:\Documents and Settings\John\Desktop\RealGaming\SERVER\gamemodes\RealGaming.pwn(20612) : error 010: invalid function or declaration
C:\Documents and Settings\John\Desktop\RealGaming\SERVER\gamemodes\RealGaming.pwn(20615) : error 021: symbol already defined: "format"
C:\Documents and Settings\John\Desktop\RealGaming\SERVER\gamemodes\RealGaming.pwn(20618) : error 010: invalid function or declaration
C:\Documents and Settings\John\Desktop\RealGaming\SERVER\gamemodes\RealGaming.pwn(20621) : error 021: symbol already defined: "format"
C:\Documents and Settings\John\Desktop\RealGaming\SERVER\gamemodes\RealGaming.pwn(20624) : error 010: invalid function or declaration
C:\Documents and Settings\John\Desktop\RealGaming\SERVER\gamemodes\RealGaming.pwn(20630) : error 010: invalid function or declaration
C:\Documents and Settings\John\Desktop\RealGaming\SERVER\gamemodes\RealGaming.pwn(20632) : error 010: invalid function or declaration
C:\Documents and Settings\John\Desktop\RealGaming\SERVER\gamemodes\RealGaming.pwn(20635) : error 010: invalid function or declaration
C:\Documents and Settings\John\Desktop\RealGaming\SERVER\gamemodes\RealGaming.pwn(20637) : error 010: invalid function or declaration
C:\Documents and Settings\John\Desktop\RealGaming\SERVER\gamemodes\RealGaming.pwn(20639) : error 010: invalid function or declaration
C:\Documents and Settings\John\Desktop\RealGaming\SERVER\gamemodes\RealGaming.pwn(20642) : error 010: invalid function or declaration
C:\Documents and Settings\John\Desktop\RealGaming\SERVER\gamemodes\RealGaming.pwn(20644) : error 010: invalid function or declaration
C:\Documents and Settings\John\Desktop\RealGaming\SERVER\gamemodes\RealGaming.pwn(20646) : error 010: invalid function or declaration
C:\Documents and Settings\John\Desktop\RealGaming\SERVER\gamemodes\RealGaming.pwn(20649) : error 010: invalid function or declaration
C:\Documents and Settings\John\Desktop\RealGaming\SERVER\gamemodes\RealGaming.pwn(20652) : error 010: invalid function or declaration
C:\Documents and Settings\John\Desktop\RealGaming\SERVER\gamemodes\RealGaming.pwn(20662) : error 010: invalid function or declaration
C:\Documents and Settings\John\Desktop\RealGaming\SERVER\gamemodes\RealGaming.pwn(20664) : error 010: invalid function or declaration
C:\Documents and Settings\John\Desktop\RealGaming\SERVER\gamemodes\RealGaming.pwn(20674) : error 010: invalid function or declaration
C:\Documents and Settings\John\Desktop\RealGaming\SERVER\gamemodes\RealGaming.pwn(20678) : error 010: invalid function or declaration
C:\Documents and Settings\John\Desktop\RealGaming\SERVER\gamemodes\RealGaming.pwn(20680) : error 010: invalid function or declaration
C:\Documents and Settings\John\Desktop\RealGaming\SERVER\gamemodes\RealGaming.pwn(20684) : error 010: invalid function or declaration
C:\Documents and Settings\John\Desktop\RealGaming\SERVER\gamemodes\RealGaming.pwn(20686) : error 010: invalid function or declaration
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
26 Errors.
PSL HELP ME! I give +Rep
Re: Dialog problem /cars -
Sn4ke2 - 20.01.2015
Up! Help!
Re: Dialog problem /cars -
xVIP3Rx - 20.01.2015
Post lines "20599", "20615" and "20621"
Re: Dialog problem /cars -
PowerPC603 - 20.01.2015
My guess is you're missing a closing bracket right before line 20599.
Re: Dialog problem /cars -
Sn4ke2 - 20.01.2015
[B] I make some modification on my script and the new dialog is :
Код:
if(dialogid == 8765)// dialog masini
{
new query2[ 4048 ];
new carid2[ 4049 ];
new text1997[ 4050 ];
if(!response)
{
SendClientMessage(playerid, 0xFF0000FF, "Ai anulat.");
return 1; // We processed it
}
switch(listitem)
{
case 0:
{
format(text1997, sizeof(text1997),"Lock\nAlege chei\n", "Alege", "Anulare");
ShowPlayerDialog(playerid,8766,DIALOG_STYLE_LIST, "Slot 1:", text1997, "Alege","Anulare");
}
case 1:
{
//format(text1997, sizeof(text1997),"Lock\nAlege chei\n", "Alege", "Anulare");
ShowPlayerDialog(playerid,8767,DIALOG_STYLE_LIST, "Slot 2:", text1997, "Alege","Anulare");
}
case 2:
{
ShowPlayerDialog(playerid, 8768, DIALOG_STYLE_LIST, "Slot 3:", "Lock\nAlege chei\n", "Alege", "Anulare");
}
}
}
if((dialogid == 8766) || (dialogid == 8767) || (dialogid == 8768))
{
if(!response)
{
SendClientMessage(playerid, 0xFF0000FF, "Ai anulat.");
return 1; // We processed it
}
if(dialogid == 8766)
{
if(PlayerData[playerid][pPcarkey] == 999)
{
SendClientMessage(playerid, 0xFF0000FF, "Nu ai o masina pe acest slot.");
return 1; // We processed it
}
switch(listitem)
{
case 0:
{
if(SwitchKey[playerid] == 1)
{
//new carid2 = PlayerData[playerid][pPcarkey]; ASTA eu am scos-o pentru ca imi dadea eroare!!!!!!!!
if(CarData[carid2][cLockk] == 0)
{
SendClientMessage(playerid, COLOR_GRAD1, "Masina personala a fost incuiata.");
PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
CarData[carid2][cLockk] = 1;
VehLocked[carid+PreVehicle] = 1;
GetVehicleParamsEx(carid+PreVehicle,engine,lights,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(carid+PreVehicle,engine,lights,alarm,1,bonnet,boot,objective);
format(query, sizeof(query), "UPDATE cars SET Lockk='%d' WHERE id=%d",CarData[carid][cLockk], carid);
mysql_query(query);
return 1;
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "Masina personala a fost descuiata.");
PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
CarData[carid2][cLockk] = 0;
VehLocked[carid2+PreVehicle] = 0;
GetVehicleParamsEx(carid+PreVehicle,engine,lights,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(carid+PreVehicle,engine,lights,alarm,0,bonnet,boot,objective);
format(query, sizeof(query), "UPDATE cars SET Lockk='%d' WHERE id=%d", CarData[carid][cLockk], carid);
mysql_query(query);
return 1;
}
}
}
case 1:
{
if(PlayerData[playerid][pPcarkey] != 999 && PlayerData[playerid][pPcarkey] != 0)
{
SwitchKey[playerid] = 1;
SendClientMessage(playerid, COLOR_GRAD1, "Acum controlezi masina personala");
return 1;
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "{d0c145}Server:{FFFFFF} Nu detii masina personala!");
SwitchKey[playerid] = 1;
return 1;
}
}
}
}
}
And the new error is :
Код:
C:\Documents and Settings\John\Desktop\RealGaming\SERVER\gamemodes\RealGaming.pwn(21555) : error 010: invalid function or declaration
C:\Documents and Settings\John\Desktop\RealGaming\SERVER\gamemodes\RealGaming.pwn(21561) : error 010: invalid function or declaration
C:\Documents and Settings\John\Desktop\RealGaming\SERVER\gamemodes\RealGaming.pwn(21564) : error 010: invalid function or declaration
C:\Documents and Settings\John\Desktop\RealGaming\SERVER\gamemodes\RealGaming.pwn(21566) : error 010: invalid function or declaration
C:\Documents and Settings\John\Desktop\RealGaming\SERVER\gamemodes\RealGaming.pwn(21568) : error 010: invalid function or declaration
C:\Documents and Settings\John\Desktop\RealGaming\SERVER\gamemodes\RealGaming.pwn(21571) : error 021: symbol already defined: "format"
C:\Documents and Settings\John\Desktop\RealGaming\SERVER\gamemodes\RealGaming.pwn(21574) : error 010: invalid function or declaration
C:\Documents and Settings\John\Desktop\RealGaming\SERVER\gamemodes\RealGaming.pwn(21578) : error 021: symbol already defined: "ShowPlayerDialog"
C:\Documents and Settings\John\Desktop\RealGaming\SERVER\gamemodes\RealGaming.pwn(21580) : error 010: invalid function or declaration
C:\Documents and Settings\John\Desktop\RealGaming\SERVER\gamemodes\RealGaming.pwn(21586) : error 010: invalid function or declaration
C:\Documents and Settings\John\Desktop\RealGaming\SERVER\gamemodes\RealGaming.pwn(21588) : error 010: invalid function or declaration
C:\Documents and Settings\John\Desktop\RealGaming\SERVER\gamemodes\RealGaming.pwn(21591) : error 010: invalid function or declaration
C:\Documents and Settings\John\Desktop\RealGaming\SERVER\gamemodes\RealGaming.pwn(21593) : error 010: invalid function or declaration
C:\Documents and Settings\John\Desktop\RealGaming\SERVER\gamemodes\RealGaming.pwn(21595) : error 010: invalid function or declaration
C:\Documents and Settings\John\Desktop\RealGaming\SERVER\gamemodes\RealGaming.pwn(21598) : error 010: invalid function or declaration
C:\Documents and Settings\John\Desktop\RealGaming\SERVER\gamemodes\RealGaming.pwn(21600) : error 010: invalid function or declaration
C:\Documents and Settings\John\Desktop\RealGaming\SERVER\gamemodes\RealGaming.pwn(21602) : error 010: invalid function or declaration
C:\Documents and Settings\John\Desktop\RealGaming\SERVER\gamemodes\RealGaming.pwn(21605) : error 010: invalid function or declaration
C:\Documents and Settings\John\Desktop\RealGaming\SERVER\gamemodes\RealGaming.pwn(21608) : error 010: invalid function or declaration
C:\Documents and Settings\John\Desktop\RealGaming\SERVER\gamemodes\RealGaming.pwn(21618) : error 010: invalid function or declaration
C:\Documents and Settings\John\Desktop\RealGaming\SERVER\gamemodes\RealGaming.pwn(21620) : error 010: invalid function or declaration
C:\Documents and Settings\John\Desktop\RealGaming\SERVER\gamemodes\RealGaming.pwn(21630) : error 010: invalid function or declaration
C:\Documents and Settings\John\Desktop\RealGaming\SERVER\gamemodes\RealGaming.pwn(21634) : error 010: invalid function or declaration
C:\Documents and Settings\John\Desktop\RealGaming\SERVER\gamemodes\RealGaming.pwn(21636) : error 010: invalid function or declaration
C:\Documents and Settings\John\Desktop\RealGaming\SERVER\gamemodes\RealGaming.pwn(21640) : error 010: invalid function or declaration
C:\Documents and Settings\John\Desktop\RealGaming\SERVER\gamemodes\RealGaming.pwn(21642) : error 010: invalid function or declaration
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
26 Errors.
Re: Dialog problem /cars -
Sn4ke2 - 20.01.2015
UP! somebody?
Re: Dialog problem /cars -
PMH - 20.01.2015
You're missing a bracket somewhere..
Re: Dialog problem /cars -
Sn4ke2 - 20.01.2015
I don't think so becouse i search with missing Bracket and the result ( 18 ) - OPEN , ( 18 ) - CLOSE !
somebody else ?
Re: Dialog problem /cars -
Sn4ke2 - 20.01.2015
UP! ----- !
Re: Dialog problem /cars -
xVIP3Rx - 20.01.2015
If you don't mind, post your whole script into PasteBin, Delete it after it's fixed, But I need to take a loop at all of it.