SA-MP Forums Archive
little Problem - 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: little Problem (/showthread.php?tid=369814)



little Problem - Windrush - 18.08.2012

If You Can Fix it I will gonna Rep you


pawn Код:
dcmd_vcall(playerid, params[])
{
 #pragma unused params
    new Slot;
    if(sscanf(params,"d",Slot)) return SendClientMessage(playerid, Red, "[ERROR]Usage: /vcall [Slot]");
    if(Slot == 1)
    {
         if(Car1(playerid) == 0) return SendClientMessage(playerid, Red, "You didn't have a car in slot 1"); //LINE 7925
        SetTimerEx("Timer1",5000,false,"i",playerid);
        SetVehicleToRespawn(Car1(playerid));
        SendClientMessage(playerid, Green, "You has call you vehicle. Please wait 5 second");
    }
    else if(Slot == 2)
    {
        if(Car2(playerid) == 0) return SendClientMessage(playerid, Red, "You didn't have a car in slot 2");
        SetTimerEx("Timer1",5000,false,"i",playerid);
        SetVehicleToRespawn(Car2(playerid));
        SendClientMessage(playerid, Green, "You has call you vehicle. Please wait 5 second");
    }
    else if(Slot == 3)
    {
        if(Car3(playerid) == 0) return SendClientMessage(playerid, Red, "You didn't have a car in slot 3");
        SetTimerEx("Timer1",5000,false,"i",playerid);
        SetVehicleToRespawn(Car3(playerid)); //I added this line.
        SendClientMessage(playerid, Green, "You has call you vehicle. Please wait 5 second");
    }
    return 1;
}

The errors
pawn Код:
C:\Users\carlo\Desktop\New folder\pawno\include\fixes.inc(2482) : warning 217: loose indentation
C:\Users\carlo\Desktop\New folder\gamemodes\SATDM_v11.pwn(2495) : warning 217: loose indentation
C:\Users\carlo\Desktop\New folder\gamemodes\SATDM_v11.pwn(7925) : error 012: invalid function call, not a valid address
C:\Users\carlo\Desktop\New folder\gamemodes\SATDM_v11.pwn(7925) : warning 215: expression has no effect
C:\Users\carlo\Desktop\New folder\gamemodes\SATDM_v11.pwn(7925) : error 001: expected token: ";", but found ")"
C:\Users\carlo\Desktop\New folder\gamemodes\SATDM_v11.pwn(7925) : error 029: invalid expression, assumed zero
C:\Users\carlo\Desktop\New folder\gamemodes\SATDM_v11.pwn(7925) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.



Re: little Problem - RanSEE - 18.08.2012

Never mind.


Re: little Problem - Cjgogo - 18.08.2012

Quote:
Originally Posted by RanSEE
Посмотреть сообщение
Kindly Post line no. 7925
Kindly use mouse,so you would have seen he has commented line no. 7925.

Here's the fix:
pawn Код:
dcmd_vcall(playerid, params[])
{
    new Slot;
    if(sscanf(params,"d",Slot)) return SendClientMessage(playerid, Red, "[ERROR]Usage: /vcall [Slot]");
    if(Slot == 1)
    {
         if(Car1(playerid) == 0) return SendClientMessage(playerid, Red, "You didn't have a car in slot 1"); //LINE 7925
        SetTimerEx("Timer1",5000,false,"i",playerid);
        SetVehicleToRespawn(Car1(playerid));
        SendClientMessage(playerid, Green, "You has call you vehicle. Please wait 5 second");
    }
    else if(Slot == 2)
    {
        if(Car2(playerid) == 0) return SendClientMessage(playerid, Red, "You didn't have a car in slot 2");
        SetTimerEx("Timer1",5000,false,"i",playerid);
        SetVehicleToRespawn(Car2(playerid));
        SendClientMessage(playerid, Green, "You has call you vehicle. Please wait 5 second");
    }
    else if(Slot == 3)
    {
        if(Car3(playerid) == 0) return SendClientMessage(playerid, Red, "You didn't have a car in slot 3");
        SetTimerEx("Timer1",5000,false,"i",playerid);
        SetVehicleToRespawn(Car3(playerid)); //I added this line.
        SendClientMessage(playerid, Green, "You has call you vehicle. Please wait 5 second");
    }
    return 1;
}



Re: little Problem - Windrush - 18.08.2012

pawn Код:
C:\Users\carlo\Desktop\New folder\pawno\include\fixes.inc(2482) : warning 217: loose indentation
C:\Users\carlo\Desktop\New folder\gamemodes\SATDM_v11.pwn(2495) : warning 217: loose indentation
C:\Users\carlo\Desktop\New folder\gamemodes\SATDM_v11.pwn(7924) : error 012: invalid function call, not a valid address
C:\Users\carlo\Desktop\New folder\gamemodes\SATDM_v11.pwn(7924) : warning 215: expression has no effect
C:\Users\carlo\Desktop\New folder\gamemodes\SATDM_v11.pwn(7924) : error 001: expected token: ";", but found ")"
C:\Users\carlo\Desktop\New folder\gamemodes\SATDM_v11.pwn(7924) : error 029: invalid expression, assumed zero
C:\Users\carlo\Desktop\New folder\gamemodes\SATDM_v11.pwn(7924) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.
?

The Line 7925
pawn Код:
if(Car1(playerid) == 0) return SendClientMessage(playerid, Red, "You didn't have a car in slot 1");



Re: little Problem - Cjgogo - 18.08.2012

Do you have sscanf plugin and include?


Re: little Problem - JaKe Elite - 18.08.2012

try changing (playerid) to [playerid]
Plus you can't give rep.


Re: little Problem - Windrush - 18.08.2012

Quote:
Originally Posted by Cjgogo
Посмотреть сообщение
Do you have sscanf plugin and include?
Yes i have


Re: little Problem - Windrush - 18.08.2012

Quote:
Originally Posted by Romel
Посмотреть сообщение
try changing (playerid) to [playerid]
Plus you can't give rep.
i try then the error is this now

pawn Код:
C:\Users\carlo\Desktop\New folder\pawno\include\fixes.inc(2482) : warning 217: loose indentation
C:\Users\carlo\Desktop\New folder\gamemodes\SATDM_v11.pwn(2495) : warning 217: loose indentation
C:\Users\carlo\Desktop\New folder\gamemodes\SATDM_v11.pwn(7925) : error 028: invalid subscript (not an array or too many subscripts): "Car1"
C:\Users\carlo\Desktop\New folder\gamemodes\SATDM_v11.pwn(7925) : warning 215: expression has no effect
C:\Users\carlo\Desktop\New folder\gamemodes\SATDM_v11.pwn(7925) : error 001: expected token: ";", but found "]"
C:\Users\carlo\Desktop\New folder\gamemodes\SATDM_v11.pwn(7925) : error 029: invalid expression, assumed zero
C:\Users\carlo\Desktop\New folder\gamemodes\SATDM_v11.pwn(7925) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.

can you Fix it ? if you fix it i will gonna rep you


Re: little Problem - Windrush - 18.08.2012

No Reply ??