errors - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: errors (
/showthread.php?tid=353975)
errors -
Dziugsas - 25.06.2012
Код:
I:\GTA San Andreas\RRP\gamemodes\r-rp.pwn(322) : error 017: undefined symbol "newkeys"
I:\GTA San Andreas\RRP\gamemodes\r-rp.pwn(707) : error 002: only a single statement (or expression) can follow each "case"
I:\GTA San Andreas\RRP\gamemodes\r-rp.pwn(711) : error 002: only a single statement (or expression) can follow each "case"
I:\GTA San Andreas\RRP\gamemodes\r-rp.pwn(711 -- 712) : error 029: invalid expression, assumed zero
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
4 Errors.
In these lines :
Код:
if(newkeys == KEY_SECONDARY_ATTACK)
(322)
Код:
case DIALOG_CARS+5://For lock
{
switch(listitem)
{
case 0: {
if(pInfo[playerid][Veh1] != 9999) { C_Data[pInfo[playerid][Veh1]][Lock] = 1; CheckCar(pInfo[playerid][Veh1]); } }
case 1: {
if(pInfo[playerid][Veh2] != 9999) { C_Data[pInfo[playerid][Veh2]][Lock] = 1; CheckCar(pInfo[playerid][Veh2]); } }
case 2: {
if(pInfo[playerid][Veh3] != 9999) { C_Data[pInfo[playerid][Veh3]][Lock] = 1; CheckCar(pInfo[playerid][Veh3]); } } // 707
return 1;
}
Код:
if(dialogid == 1)
{ // 711
if(!response) return Kick(playerid); // 712
if(response)
Re: errors -
Grand_Micha - 25.06.2012
First, change this:
if(newkeys == KEY_SECONDARY_ATTACK)
to this:
if(newkeys & KEY_SECONDARY_ATTACK)
Re: errors -
Smokkr - 25.06.2012
Open Pawno(folder)>Pawno.exe>Open>YourGamemode.Then compile it.If still shows that PM me.
Re: errors -
Dziugsas - 25.06.2012
still same errors
Re: errors -
Grand_Micha - 25.06.2012
pawn Код:
if(InsertInfoHere == DIALOG_CARS+5) //For lock
{
switch(listitem)
{
case 0:
{
if(pInfo[playerid][Veh1] != 9999)
{
C_Data[pInfo[playerid][Veh1]][Lock] = 1;
CheckCar(pInfo[playerid][Veh1]);
}
}
case 1:
{
if(pInfo[playerid][Veh2] != 9999)
{
C_Data[pInfo[playerid][Veh2]][Lock] = 1;
CheckCar(pInfo[playerid][Veh2]);
}
}
case 2:
{
if(pInfo[playerid][Veh3] != 9999)
{
C_Data[pInfo[playerid][Veh3]][Lock] = 1;
CheckCar(pInfo[playerid][Veh3]);
}
}
}
return 1;
}
Re: errors -
Skaizo - 25.06.2012
if(newkeys == KEY_SECONDARY_ATTACK)
this must be in public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
Re: errors -
Grand_Micha - 25.06.2012
Skaizo meant if(newkeys & KEY_SECONDARY_ATTACK), of course.