SA-MP Forums Archive
Vehicle storage bugg - 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: Vehicle storage bugg (/showthread.php?tid=384276)



Vehicle storage bugg - eclipses - 11.10.2012

Hello there, i have a problem with my vehicle storage system.
Could anyone assist me it would be great. Thanks.


Pawno compile errors

Код:
C:\Users\Nick\Desktop\Nick's Ser\gamemodes\AMRP.pwn(47333) : error 029: invalid expression, assumed zero
C:\Users\Nick\Desktop\Nick's Ser\gamemodes\AMRP.pwn(47333) : warning 215: expression has no effect
C:\Users\Nick\Desktop\Nick's Ser\gamemodes\AMRP.pwn(47333) : warning 215: expression has no effect
C:\Users\Nick\Desktop\Nick's Ser\gamemodes\AMRP.pwn(47333) : warning 215: expression has no effect
C:\Users\Nick\Desktop\Nick's Ser\gamemodes\AMRP.pwn(47333) : warning 215: expression has no effect
C:\Users\Nick\Desktop\Nick's Ser\gamemodes\AMRP.pwn(47333) : warning 215: expression has no effect
C:\Users\Nick\Desktop\Nick's Ser\gamemodes\AMRP.pwn(47333) : error 001: expected token: ";", but found ")"
C:\Users\Nick\Desktop\Nick's Ser\gamemodes\AMRP.pwn(47333) : error 029: invalid expression, assumed zero
C:\Users\Nick\Desktop\Nick's Ser\gamemodes\AMRP.pwn(47333) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
Vehicle Storage system

Код:
CMD:vstorage(playerid, params[])
{
	new vstring[1024];
	for(new i; i < MAX_PLAYERVEHICLES; i++)
	{
		if(PlayerVehicleInfo[playerid][i][pvId] > INVALID_PLAYER_VEHICLE_ID)
			format(vstring, sizeof(vstring), "%s\n%s", vstring, VehicleName[PlayerVehicleInfo[playerid][i][pvModelId] - 400]);

		else if(PlayerVehicleInfo[playerid][i][pvImpounded] == 1)
			format(vstring, sizeof(vstring), "%s\n%s (impounded)", vstring, VehicleName[PlayerVehicleInfo[playerid][i][pvModelId] - 400]);

		else
		format(vstring, sizeof(vstring), "%s\nEmpty", vstring);
	}
	ShowPlayerDialog(playerid, VSTORAGE, DIALOG_STYLE_LIST, "OnStar Vehicle Storage", vstring, "(UN)Store", "Cancel");
	return 1;
}
Redmarked the problem line.


Re: Vehicle storage bugg - eclipses - 11.10.2012

Quote:
Originally Posted by ******
Посмотреть сообщение
Which line is the problem line?
Код:
ShowPlayerDialog(playerid, VSTORAGE, DIALOG_STYLE_LIST, "OnStar Vehicle Storage", vstring, "(UN)Store", "Cancel");



Re: Vehicle storage bugg - zSuYaNw - 11.10.2012

PHP код:
CMD:vstorage(playeridparams[])
{
    new 
vstring[1024];
    for(new 
iMAX_PLAYERVEHICLESi++)
    {
        if(
PlayerVehicleInfo[playerid][i][pvId] > INVALID_PLAYER_VEHICLE_ID)
        {
            
format(vstringsizeof(vstring), "%s\n%s"vstringVehicleName[PlayerVehicleInfo[playerid][i][pvModelId] - 400]);
        }
        if(
PlayerVehicleInfo[playerid][i][pvImpounded] != 1)
        {
            
format(vstringsizeof(vstring), "%s\n%s (impounded)"vstringVehicleName[PlayerVehicleInfo[playerid][i][pvModelId] - 400]);
        }
        else
        {
            
format(vstringsizeof(vstring), "%s\nEmpty"vstring);
        }
    }
    
ShowPlayerDialog(playeridVSTORAGEDIALOG_STYLE_LIST"OnStar Vehicle Storage"vstring"(UN)Store""Cancel");
    return 
1;




Re: Vehicle storage bugg - eclipses - 11.10.2012

Quote:
Originally Posted by ******
Посмотреть сообщение
How is "VSTORAGE" defined?
The define on VSTORAGE that i know of is (#define VSTORAGE)


Re: Vehicle storage bugg - eclipses - 11.10.2012

Quote:
Originally Posted by [Full]Garfield[XDB]
Посмотреть сообщение
PHP код:
CMD:vstorage(playeridparams[])
{
    new 
vstring[1024];
    for(new 
iMAX_PLAYERVEHICLESi++)
    {
        if(
PlayerVehicleInfo[playerid][i][pvId] > INVALID_PLAYER_VEHICLE_ID)
        {
            
format(vstringsizeof(vstring), "%s\n%s"vstringVehicleName[PlayerVehicleInfo[playerid][i][pvModelId] - 400]);
        }
        if(
PlayerVehicleInfo[playerid][i][pvImpounded] != 1)
        {
            
format(vstringsizeof(vstring), "%s\n%s (impounded)"vstringVehicleName[PlayerVehicleInfo[playerid][i][pvModelId] - 400]);
        }
        else
        {
            
format(vstringsizeof(vstring), "%s\nEmpty"vstring);
        }
    }
    [
COLOR="Red"]ShowPlayerDialog(playeridVSTORAGEDIALOG_STYLE_LIST"OnStar Vehicle Storage"vstring"(UN)Store""Cancel");[/COLOR]
    return 
1;

Got the same problem with this one. Thanks tho for trying.

Код:
C:\Users\Nick\Desktop\Nick's Ser\gamemodes\AMRP.pwn(47337) : error 029: invalid expression, assumed zero
C:\Users\Nick\Desktop\Nick's Ser\gamemodes\AMRP.pwn(47337) : warning 215: expression has no effect
C:\Users\Nick\Desktop\Nick's Ser\gamemodes\AMRP.pwn(47337) : warning 215: expression has no effect
C:\Users\Nick\Desktop\Nick's Ser\gamemodes\AMRP.pwn(47337) : warning 215: expression has no effect
C:\Users\Nick\Desktop\Nick's Ser\gamemodes\AMRP.pwn(47337) : warning 215: expression has no effect
C:\Users\Nick\Desktop\Nick's Ser\gamemodes\AMRP.pwn(47337) : warning 215: expression has no effect
C:\Users\Nick\Desktop\Nick's Ser\gamemodes\AMRP.pwn(47337) : error 001: expected token: ";", but found ")"
C:\Users\Nick\Desktop\Nick's Ser\gamemodes\AMRP.pwn(47337) : error 029: invalid expression, assumed zero
C:\Users\Nick\Desktop\Nick's Ser\gamemodes\AMRP.pwn(47337) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
Sorry for multi post. Sent the other one to fast.


Re: Vehicle storage bugg - Riddick94 - 11.10.2012

pawn Код:
CMD:vstorage(playerid, params[])
Try to change to this:

pawn Код:
CMD:vstorage2(playerid, params[])
If i good remember in ZCMD its automaticly defining command while used the tag of command processor. But i am not sure, give us more code from this stuff (define code etc.)

@******, remove your auto-pr0-replying-bot.. :>


Re: Vehicle storage bugg - eclipses - 11.10.2012

Quote:
Originally Posted by ******
Посмотреть сообщение
Can you post the whole thing? If there's no value then that's your problem.
How do you mean posting the whole thing?


Re: Vehicle storage bugg - gtakillerIV - 11.10.2012

Quote:
Originally Posted by Riddick94
Посмотреть сообщение
pawn Код:
CMD:vstorage(playerid, params[])
Try to change to this:

pawn Код:
CMD:vstorage2(playerid, params[])
If i good remember in ZCMD its automaticly defining command while used the tag of command processor. But i am not sure, give us more code from this stuff (define code etc.)
No error says that "vstorage" is already defined, so no need to rename the command.


Re: Vehicle storage bugg - Riddick94 - 11.10.2012

He meant to give us your macro of vstorage. Because you told use there's only define without value.


Re: Vehicle storage bugg - eclipses - 11.10.2012

Quote:
Originally Posted by Riddick94
Посмотреть сообщение
He meant to give us your macro of vstorage. Because you told use there's only define without value.
The define value is 1024 so basicly (#define VSTORAGE 1024)

Solved error log. Menu is still bugged.