12.08.2013, 10:07
I have now two dialogs in my .pwn file and the second one doesn't seem to be working and I can't spot the mistake.
Here's the code:
And here are the errors that I get:
Thanks.
Here's the code:
pawn Код:
if (dialogid == 1338 && response)
{
switch(listitem)
{
case 0:
{
ShowPlayerDialog(playerid , 1339 , DIALOG_STYLE_LIST , "Car Shop" , "Cadrona($20 000)\nBlista($60 000)" , "Buy" , "Exit");
}
}
}
if (dialogid == 1339 && response)
{
switch(listitem)
{
case 0:
{
if(GetPlayerMoney(playerid) < 20000) return SendClientMessage(playerid , 0xFFFFFFFF , "You don't have enough money");
CreateVehicle(527 , 210.6137 , -8.0158 , 2.5338 , 1 , 1 , 500);
GivePlayerMoney(playerid -20000);
SendClientMessage(playerid , 0x489048FF , "-----------------------------------------------------");
SendClientMessage(playerid , 0x489048FF , "You have bought Cadrona for $20 000!");
}
case 1:
{
if(GetPlayerMoney(playerid) < 60000) return SendClientMessage(playerid , 0xFFFFFFFF , "You don't have enough money");
CreateVehicle(496 , 210.6137 , -8.0158 , 2.5338 , 1 , 1 , 500)
GivePlayerMoney(playerid -60000)
SendClientMessage(playerid , 0x489048FF , "-----------------------------------------------------");
SendClientMessage(playerid , 0x489048FF , "You have bought Blista Compact for $60 000!");
}
}
}
return 1;
}
pawn Код:
C:\Users\Sami\Desktop\SERVU\shit.pwn(327) : error 010: invalid function or declaration
C:\Users\Sami\Desktop\SERVU\shit.pwn(329) : error 010: invalid function or declaration
C:\Users\Sami\Desktop\SERVU\shit.pwn(331) : error 010: invalid function or declaration
C:\Users\Sami\Desktop\SERVU\shit.pwn(337) : error 010: invalid function or declaration
C:\Users\Sami\Desktop\SERVU\shit.pwn(339) : error 010: invalid function or declaration
C:\Users\Sami\Desktop\SERVU\shit.pwn(341) : error 010: invalid function or declaration
C:\Users\Sami\Desktop\SERVU\shit.pwn(343) : error 010: invalid function or declaration
C:\Users\Sami\Desktop\SERVU\shit.pwn(349) : error 010: invalid function or declaration
C:\Users\Sami\Desktop\SERVU\shit.pwn(351) : error 010: invalid function or declaration
C:\Users\Sami\Desktop\SERVU\shit.pwn(359) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
10 Errors.