command help please.
#1

i made this cmd from scratch but i got 4errors said invalid expression or something like that what the proplem please help for that.
pawn Код:
CMD:vstorage(playerid, params[])
{
             for(new i; i < MAX_PLAYERVEHICLES; i++)
             {
               if(PlayerVehicleInfo[playerid][i][pvId] > INVALID_PLAYER_VEHICLE_ID)
               {
                 new vstring[1024];
                 format(vstring, sizeof(vstring), "%s\n%s", vstring, VehicleName[PlayerVehicleInfo[playerid][i][pvModelId] - 400]);
                 LoadPlayerVehicles(playerid, pvId);(error)
                 return 1;
               }
               if(PlayerVehicleInfo[playerid][i][pvImpounded] == 1)
               {
                 new vstring[1024];
                 format(vstring, sizeof(vstring), "%s\n%s (impounded)", vstring, VehicleName[PlayerVehicleInfo[playerid][i][pvModelId] - 400]);
                 UnloadPlayerVehicles(playerid, pvId);(error)
                 return 1;
              }
              else
              {
                 new vstring[1024];
                 format(vstring, sizeof(vstring), "%s\nEmpty", vstring);
              }
              new vstring[1024];
              ShowPlayerDialog(playerid, VSTORAGE, DIALOG_STYLE_LIST, "OnStar Vehicle Storage", vstring, "(De)Spawn", "Cancel");(error)
              return 1;

this is error lines
pawn Код:
F:\San Andreas\latest server job\h\h\gamemodes\VGRP.pwn(95083) : warning 202: number of arguments does not match definition
F:\San Andreas\latest server job\h\h\gamemodes\VGRP.pwn(95090) : warning 202: number of arguments does not match definition
F:\San Andreas\latest server job\h\h\gamemodes\VGRP.pwn(95099) : error 029: invalid expression, assumed zero
F:\San Andreas\latest server job\h\h\gamemodes\VGRP.pwn(95099) : warning 215: expression has no effect
F:\San Andreas\latest server job\h\h\gamemodes\VGRP.pwn(95099) : warning 215: expression has no effect
F:\San Andreas\latest server job\h\h\gamemodes\VGRP.pwn(95099) : warning 215: expression has no effect
F:\San Andreas\latest server job\h\h\gamemodes\VGRP.pwn(95099) : warning 215: expression has no effect
F:\San Andreas\latest server job\h\h\gamemodes\VGRP.pwn(95099) : warning 215: expression has no effect
F:\San Andreas\latest server job\h\h\gamemodes\VGRP.pwn(95099) : error 001: expected token: ";", but found ")"
F:\San Andreas\latest server job\h\h\gamemodes\VGRP.pwn(95099) : error 029: invalid expression, assumed zero
F:\San Andreas\latest server job\h\h\gamemodes\VGRP.pwn(95099) : 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.
Reply
#2

show your error line and error
Reply
#3

Can you please show the exact lines it shows those errors?
Reply
#4

Код:
 ShowPlayerDialog(playerid, VSTORAGE, DIALOG_STYLE_LIST, "OnStar Vehicle Storage", vstring, "(De)Spawn", "Cancel");
Dat line
Reply
#5

for(new i=0; i<MAX_PLAYERVEHICLES; i++) use it
Reply
#6

yeah this is it
Reply
#7

Quote:
Originally Posted by PrinceKumar
Посмотреть сообщение
for(new i=0; i<MAX_PLAYERVEHICLES; i++) use it
it doesnt matter if he declares that i = 0 or not.

I dont think theres a reason for you to use a 1024 size string, lower it down to 128 see if that helps a bit.
Reply
#8

i wrote error next to error lines
Reply
#9

pawn Код:
CMD:vstorage(playerid, params[])
{
             for(new i; i < MAX_PLAYERVEHICLES; i++)
             {
               if(PlayerVehicleInfo[playerid][i][pvId] > INVALID_PLAYER_VEHICLE_ID)
               {
                 new vstring[1024];
                 format(vstring, sizeof(vstring), "%s\n%s", vstring, VehicleName[PlayerVehicleInfo[playerid][i][pvModelId] - 400]);
                 LoadPlayerVehicles(playerid, pvId);(error)
                 return 1;
               }
               if(PlayerVehicleInfo[playerid][i][pvImpounded] == 1)
               {
                 new vstring[1024];
                 format(vstring, sizeof(vstring), "%s\n%s (impounded)", vstring, VehicleName[PlayerVehicleInfo[playerid][i][pvModelId] - 400]);
                 UnloadPlayerVehicles(playerid, pvId);(error)
                 return 1;
               }
               else
               {
                  new vstring[1024];
                 format(vstring, sizeof(vstring), "%s\nEmpty", vstring);
               }
              }
              //new vstring[1024];
              ShowPlayerDialog(playerid, VSTORAGE, DIALOG_STYLE_LIST, "OnStar Vehicle Storage", vstring, "(De)Spawn", "Cancel");
}
              return 1;
}

try using this.
Reply
#10

Quote:
Originally Posted by Edix
Посмотреть сообщение
pawn Код:
CMD:vstorage(playerid, params[])
{
             for(new i; i < MAX_PLAYERVEHICLES; i++)
             {
               if(PlayerVehicleInfo[playerid][i][pvId] > INVALID_PLAYER_VEHICLE_ID)
               {
                 new vstring[1024];
                 format(vstring, sizeof(vstring), "%s\n%s", vstring, VehicleName[PlayerVehicleInfo[playerid][i][pvModelId] - 400]);
                 LoadPlayerVehicles(playerid, pvId);(error)
                 return 1;
               }
               if(PlayerVehicleInfo[playerid][i][pvImpounded] == 1)
               {
                 new vstring[1024];
                 format(vstring, sizeof(vstring), "%s\n%s (impounded)", vstring, VehicleName[PlayerVehicleInfo[playerid][i][pvModelId] - 400]);
                 UnloadPlayerVehicles(playerid, pvId);(error)
                 return 1;
               }
               else
               {
                  new vstring[1024];
                 format(vstring, sizeof(vstring), "%s\nEmpty", vstring);
               }
              }
              //new vstring[1024];
              ShowPlayerDialog(playerid, VSTORAGE, DIALOG_STYLE_LIST, "OnStar Vehicle Storage", vstring, "(De)Spawn", "Cancel");(error)
}
              return 1;
}

try using this.
pawn Код:
F:\San Andreas\latest server job\h\h\gamemodes\VGRP.pwn(95083) : warning 202: number of arguments does not match definition
F:\San Andreas\latest server job\h\h\gamemodes\VGRP.pwn(95090) : warning 202: number of arguments does not match definition
F:\San Andreas\latest server job\h\h\gamemodes\VGRP.pwn(95100) : error 029: invalid expression, assumed zero
F:\San Andreas\latest server job\h\h\gamemodes\VGRP.pwn(95100) : warning 215: expression has no effect
F:\San Andreas\latest server job\h\h\gamemodes\VGRP.pwn(95100) : warning 215: expression has no effect
F:\San Andreas\latest server job\h\h\gamemodes\VGRP.pwn(95100) : error 017: undefined symbol "vstring"
F:\San Andreas\latest server job\h\h\gamemodes\VGRP.pwn(95100) : error 029: invalid expression, assumed zero
F:\San Andreas\latest server job\h\h\gamemodes\VGRP.pwn(95100) : 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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)