Error on one line
#1

Код:
C:\Program Files\SAMP\gamemodes\erp.pwn(1551) : error 028: invalid subscript (not an array or too many subscripts): "Soidukid"
C:\Program Files\SAMP\gamemodes\erp.pwn(1551) : warning 215: expression has no effect
C:\Program Files\SAMP\gamemodes\erp.pwn(1551) : error 001: expected token: ";", but found "]"
C:\Program Files\SAMP\gamemodes\erp.pwn(1551) : error 029: invalid expression, assumed zero
C:\Program Files\SAMP\gamemodes\erp.pwn(1551) : fatal error 107: too many error messages on one line

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


4 Errors.
Error-Line
Код:
format(String, sizeof(String), "%s", List(GetVehicleModel(GetPlayerVehicleID(playerid))));
Full code
Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
  if(newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER)
	{
		new String[64];
		format(String, sizeof(String), "%s", List(GetVehicleModel(GetPlayerVehicleID(playerid))));
		TextDrawSetString(Soiduk, String);
		TextDrawShowForPlayer(playerid, Soiduk);
		format(String, sizeof(String), "%d KM/H", SaaSoidukiKiirus(playerid));
		TextDrawSetString(KM, String);
		TextDrawShowForPlayer(playerid, KM);
    TextDrawShowForPlayer(playerid, Liiklusvahend);
    TextDrawShowForPlayer(playerid, Kiirus);
	}
	else if(oldstate == PLAYER_STATE_DRIVER || oldstate == PLAYER_STATE_PASSENGER)
	{
		TextDrawHideForPlayer(playerid, Kiirus);
		TextDrawHideForPlayer(playerid, KM);
		TextDrawHideForPlayer(playerid, Liiklusvahend);
		TextDrawHideForPlayer(playerid, Soiduk);
	}
	return 1;
}
Reply
#2

/////////////////////////////////////
Reply
#3

OMFG! Soiduk Kiirus... What is that? Where are you from? I don't understand...
Reply
#4

Quote:
Originally Posted by ¤Adas¤
OMFG! Soiduk Kiirus... What is that? Where are you from? I don't understand...
Estonia. This is Estonian languange.

Soiduk (Sхiduk) = Vehicle
Kiirus = Speed
Reply
#5

new List[][] = {"vehiclenamelist","??"}; //??
pawn Код:
format(String, sizeof(String), "%s", List[GetVehicleModel(GetPlayerVehicleID(playerid))-400]);
Reply
#6

Quote:
Originally Posted by Phento
new List[][] = {"vehiclenamelist","??"}; //??
pawn Код:
format(String, sizeof(String), "%s", List[GetVehicleModel(GetPlayerVehicleID(playerid))-400]);
Код:
C:\Program Files\SAMP\gamemodes\erp.pwn(1552) : error 017: undefined symbol "List"
C:\Program Files\SAMP\gamemodes\erp.pwn(1552) : warning 215: expression has no effect
C:\Program Files\SAMP\gamemodes\erp.pwn(1552) : error 001: expected token: ";", but found "]"
C:\Program Files\SAMP\gamemodes\erp.pwn(1552) : error 029: invalid expression, assumed zero
C:\Program Files\SAMP\gamemodes\erp.pwn(1552) : fatal error 107: too many error messages on one line

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


4 Errors.
Reply
#7

pawn Код:
//                      ?????
format(String, sizeof(String), "%s",      List       (GetVehicleModel(GetPlayerVehicleID(playerid))));
What List?
Reply
#8

Quote:
Originally Posted by Phento
pawn Код:
//                      ?????
format(String, sizeof(String), "%s",     List      (GetVehicleModel(GetPlayerVehicleID(playerid))));
What List?
Only

Код:
#define List(%1) Soidukid[%1-400]
And

Код:
new	Soidukid[][] =
{
		"Landstalker",
		"Bravura",
		"Buffalo",
		"Linerunner",
		"Pereniel",
		"Sentinel",
		"Kallur",
		"Tuletorje Auto",
		"Prugiauto",
		"Limusiin",
		"Manana",
		"Infernus",
		"Voodoo",
		"Pony",
		"Mule",
		"Cheetah",
		"Kiirabiauto",
		"Leviathan",
		"Moonbeam",
		"Esperanto",
		"Takso",
		"Washington",
		"Bobcat",
		"Jaatiseauto",
		"BF Injection",
		"Hunter",
		"Premier",
		"LVP Buss",
		"Securicar",
		"Banshee",
		"LVP Paat",
		"Buss",
		"Rhino",
		"Barracks",
		"Hotknife",
		"Jarelhaagis",
		"Previon",
		"Buss",
		"Takso",
		"Stallion",
		"Rumpo",
		"RC Bandit",
		"Romero",
		"Packer",
		"Monster Truck",
		"Admiral",
		"Squalo",
		"Seasparrow",
		"Pizzaroller",
		"Tramm",
		"Jarelhaagis",
		"Turismo",
		"Speeder",
		"Reefer",
		"Tropic",
		"Flatbed",
		"Yankee",
		"Caddy",
		"Solair",
		"RC Kaubik",
		"Skimmer",
		"PCJ-600",
		"Faggio",
		"Freeway",
		"RC Baron",
		"RC Raider",
		"Glendale",
		"Oceanic",
		"Sanchez",
		"Sparrow",
		"Patriot",
		"Quad",
		"LV Piirivalve",
		"Dinghy",
		"Hermes",
		"Sabre",
		"Rustler",
		"ZR-350",
		"Walton",
		"Regina",
		"Comet",
		"BMX",
		"Burrito",
		"Vagunelamu",
		"Marquis",
		"Pagasi Vedaja",
		"Buldooser",
		"Maverick",
		"LV Uudistekopter",
		"Rancher",
		"KaPo Rancher",
		"Virgo",
		"Greenwood",
		"Jetmax",
		"Hotring",
		"Sandking",
		"Blista Compact",
		"LVP Helikopter",
		"Boxville",
		"Benson",
		"Mesa",
		"RC Goblin",
		"Hotring Racer",
		"Hotring Racer",
		"Bloodring Banger",
		"Rancher",
		"Super GT",
		"Elegant",
		"Journey",
		"Ratas",
		"Magiratas",
		"Beagle",
		"Cropdust",
		"Trikilennuk",
		"Veoauto",
		"Veoauto",
		"Nebula",
		"Majestic",
		"Buccaneer",
		"Shamal",
		"Hydra",
		"FCR-900",
		"NRG-500",
		"HPV1000",
		"Veoauto",
		"Puksiir",
		"Fortune",
		"Cadrona",
		"KaPo Veok",
		"Willard",
		"Tostuk",
		"Traktor",
		"Kombain",
		"Feltzer",
		"Remington",
		"Slamvan",
		"Blade",
		"Freight",
		"Streak",
		"Vortex",
		"Vincent",
		"Bullet",
		"Clover",
		"Sadler",
		"Tuletorje Auto",
		"Hustler",
		"Intruder",
		"Primo",
		"Cargobob",
		"Tampa",
		"Sunrise",
		"Merit",
		"Kaubik",
		"Nevada",
		"Yosemite",
		"Windsor",
		"Monster Truck",
		"Monster Truck",
		"Uranus",
		"Jester",
		"Sultan",
		"Stratum",
		"Elegy",
		"Raindance",
		"RC Tiger",
		"Flash",
		"Tahoma",
		"Savanna",
		"Bandito",
		"Freight",
		"Jarelhaagis",
		"Kart",
		"Niidumasin",
		"Dune",
		"Tanavapuhastaja",
		"Broadway",
		"Tornado",
		"AT-400",
		"DFT-30",
		"Huntley",
		"Stafford",
		"BF-400",
		"LV Uudistekaubik",
		"Tug",
		"Jarelhaagis",
		"Emperor",
		"Wayfarer",
		"Euros",
		"Hotdog",
		"Club",
		"Jarelhaagis",
		"Jarelhaagis",
		"Andromada",
		"Dodo",
		"RC Cam",
		"Launch",
		"LSP Patrullauto",
		"SFP Patrullauto",
		"LVP Patrullauto",
		"LVP Maastur",
		"Picador",
		"S.W.A.T.",
		"Alpha",
		"Phoenix",
		"Glendale",
		"Sadler",
		"Pagasi Jarelhaagis",
		"Pagasi Jarelhaagis",
		"Trepihaagis",
		"Boxville",
		"Jarelhaagis",
		"Jarelhaagis"
};
Reply
#9

pawn Код:
#include <a_samp>

new Soidukid[][] =
{
        "Landstalker",
        "Bravura",
        "Buffalo",
        "Linerunner",
        "Pereniel",
        "Sentinel",
        "Kallur",
        "Tuletorje Auto",
        "Prugiauto",
        "Limusiin",
        "Manana",
        "Infernus",
        "Voodoo",
        "Pony",
        "Mule",
        "Cheetah",
        "Kiirabiauto",
        "Leviathan",
        "Moonbeam",
        "Esperanto",
        "Takso",
        "Washington",
        "Bobcat",
        "Jaatiseauto",
        "BF Injection",
        "Hunter",
        "Premier",
        "LVP Buss",
        "Securicar",
        "Banshee",
        "LVP Paat",
        "Buss",
        "Rhino",
        "Barracks",
        "Hotknife",
        "Jarelhaagis",
        "Previon",
        "Buss",
        "Takso",
        "Stallion",
        "Rumpo",
        "RC Bandit",
        "Romero",
        "Packer",
        "Monster Truck",
        "Admiral",
        "Squalo",
        "Seasparrow",
        "Pizzaroller",
        "Tramm",
        "Jarelhaagis",
        "Turismo",
        "Speeder",
        "Reefer",
        "Tropic",
        "Flatbed",
        "Yankee",
        "Caddy",
        "Solair",
        "RC Kaubik",
        "Skimmer",
        "PCJ-600",
        "Faggio",
        "Freeway",
        "RC Baron",
        "RC Raider",
        "Glendale",
        "Oceanic",
        "Sanchez",
        "Sparrow",
        "Patriot",
        "Quad",
        "LV Piirivalve",
        "Dinghy",
        "Hermes",
        "Sabre",
        "Rustler",
        "ZR-350",
        "Walton",
        "Regina",
        "Comet",
        "BMX",
        "Burrito",
        "Vagunelamu",
        "Marquis",
        "Pagasi Vedaja",
        "Buldooser",
        "Maverick",
        "LV Uudistekopter",
        "Rancher",
        "KaPo Rancher",
        "Virgo",
        "Greenwood",
        "Jetmax",
        "Hotring",
        "Sandking",
        "Blista Compact",
        "LVP Helikopter",
        "Boxville",
        "Benson",
        "Mesa",
        "RC Goblin",
        "Hotring Racer",
        "Hotring Racer",
        "Bloodring Banger",
        "Rancher",
        "Super GT",
        "Elegant",
        "Journey",
        "Ratas",
        "Magiratas",
        "Beagle",
        "Cropdust",
        "Trikilennuk",
        "Veoauto",
        "Veoauto",
        "Nebula",
        "Majestic",
        "Buccaneer",
        "Shamal",
        "Hydra",
        "FCR-900",
        "NRG-500",
        "HPV1000",
        "Veoauto",
        "Puksiir",
        "Fortune",
        "Cadrona",
        "KaPo Veok",
        "Willard",
        "Tostuk",
        "Traktor",
        "Kombain",
        "Feltzer",
        "Remington",
        "Slamvan",
        "Blade",
        "Freight",
        "Streak",
        "Vortex",
        "Vincent",
        "Bullet",
        "Clover",
        "Sadler",
        "Tuletorje Auto",
        "Hustler",
        "Intruder",
        "Primo",
        "Cargobob",
        "Tampa",
        "Sunrise",
        "Merit",
        "Kaubik",
        "Nevada",
        "Yosemite",
        "Windsor",
        "Monster Truck",
        "Monster Truck",
        "Uranus",
        "Jester",
        "Sultan",
        "Stratum",
        "Elegy",
        "Raindance",
        "RC Tiger",
        "Flash",
        "Tahoma",
        "Savanna",
        "Bandito",
        "Freight",
        "Jarelhaagis",
        "Kart",
        "Niidumasin",
        "Dune",
        "Tanavapuhastaja",
        "Broadway",
        "Tornado",
        "AT-400",
        "DFT-30",
        "Huntley",
        "Stafford",
        "BF-400",
        "LV Uudistekaubik",
        "Tug",
        "Jarelhaagis",
        "Emperor",
        "Wayfarer",
        "Euros",
        "Hotdog",
        "Club",
        "Jarelhaagis",
        "Jarelhaagis",
        "Andromada",
        "Dodo",
        "RC Cam",
        "Launch",
        "LSP Patrullauto",
        "SFP Patrullauto",
        "LVP Patrullauto",
        "LVP Maastur",
        "Picador",
        "S.W.A.T.",
        "Alpha",
        "Phoenix",
        "Glendale",
        "Sadler",
        "Pagasi Jarelhaagis",
        "Pagasi Jarelhaagis",
        "Trepihaagis",
        "Boxville",
        "Jarelhaagis",
        "Jarelhaagis"
};

new String[128];

#define List(%0) Soidukid[%0-400]

public OnFilterScriptInit() { return 1; }

public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(newstate == PLAYER_STATE_DRIVER)
    {
      format(String, sizeof(String), "%s",List(GetVehicleModel(GetPlayerVehicleID(playerid))));
      GameTextForPlayer(playerid,String,2500,1);
    }
    return 1;
}

public OnFilterScriptExit() { return 1; }
Reply
#10

Nope that Game Text, ONLY TEXTDRAW...

Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
  if(newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER)
	{
		new String[64];
		//format(String, sizeof(String), "%s", List(GetVehicleModel(GetPlayerVehicleID(playerid))));
		format(String, sizeof(String), "%s",List(GetVehicleModel(GetPlayerVehicleID(playerid))));
		TextDrawSetString(Soiduk, String);
		TextDrawShowForPlayer(playerid, Soiduk);
		format(String, sizeof(String), "%d KM/H", SaaSoidukiKiirus(playerid));
		TextDrawSetString(KM, String);
		TextDrawShowForPlayer(playerid, KM);
    TextDrawShowForPlayer(playerid, Liiklusvahend);
    TextDrawShowForPlayer(playerid, Kiirus);
	}
	else if(oldstate == PLAYER_STATE_DRIVER || oldstate == PLAYER_STATE_PASSENGER)
	{
		TextDrawHideForPlayer(playerid, Kiirus);
		TextDrawHideForPlayer(playerid, KM);
		TextDrawHideForPlayer(playerid, Liiklusvahend);
		TextDrawHideForPlayer(playerid, Soiduk);
	}
	return 1;
}
Код:
C:\Program Files\SAMP\gamemodes\erp.pwn(1552) : error 028: invalid subscript (not an array or too many subscripts): "Soidukid"
C:\Program Files\SAMP\gamemodes\erp.pwn(1552) : warning 215: expression has no effect
C:\Program Files\SAMP\gamemodes\erp.pwn(1552) : error 001: expected token: ";", but found "]"
C:\Program Files\SAMP\gamemodes\erp.pwn(1552) : error 029: invalid expression, assumed zero
C:\Program Files\SAMP\gamemodes\erp.pwn(1552) : fatal error 107: too many error messages on one line

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


4 Errors.
Код:
format(String, sizeof(String), "%s",List(GetVehicleModel(GetPlayerVehicleID(playerid))));
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)