Fix Script
#1

Trying to create a v.i.p system and cannot get the command for the team keep saying unidentified symbol "Team_Bronzevip" can someone help please

Код:
#include <a_samp>

#if defined FILTERSCRIPT
new gTeam[MAX_PLAYERS];
#define TEAM_Bronzevip
#define TEAM_Silvervip
#define TEAM_Goldvip
#define TEAM_Platinum_Vip
#define Bronze_vip_COLOUR 0xFF00FFFF
#define Silver_vip_COLOUR 0xFF00FFFF
#define Gold_vip_COLOUR 0xFF00FFFF
#define Platinum_vip_COLOUR 0xFF00FFFF



public OnPlayerCommandText(playerid, cmdtext[])
{
     if(strcmp(cmdtext, "/pb") == 1)
	 {
         (Team_Bronzevip(playerid));
	 SetPlayerHealth(playerid, 100.0);
         SetPlayerArmour(playerid, 100.0);
         GivePlayerWeapon(playerid, 26, 999999);
         return 1;
     }
     return 1;
}

}
Reply
#2

Okay... and what's the problem ?
Reply
#3

it keeps saying undefined symbol :Team_Bronzevip
Reply
#4

I noticed you said the error was ' Team_Bronzevip ' , while the one you defined is named ' TEAM_Bronzevip ' .

Pawno is case sensitive, so whatever you define at the top for anything that has capitals/lowercase must always have the same case style (lowercase/uppercase/capitals).

So for the line saying ' undefined symbol: Team_Bronzevip ' , change the Team_Bronzevip to TEAM_Bronzevip.
Reply
#5

Код:
vip 2.pwn(70) : error 017: undefined symbol "Team_Bronzevip"
Reply
#6

Quote:
Originally Posted by trapstar2020
Посмотреть сообщение
Код:
vip 2.pwn(70) : error 017: undefined symbol "Team_Bronzevip"
Oh jesus, use this

PHP код:
#include <a_samp>
#if defined FILTERSCRIPT
new gTeam[MAX_PLAYERS];
#define TEAM_Bronzevip
#define TEAM_Silvervip
#define TEAM_Goldvip
#define TEAM_Platinum_Vip
#define Bronze_vip_COLOUR 0xFF00FFFF
#define Silver_vip_COLOUR 0xFF00FFFF
#define Gold_vip_COLOUR 0xFF00FFFF
#define Platinum_vip_COLOUR 0xFF00FFFF
public OnPlayerCommandText(playeridcmdtext[])
{
     if(
strcmp(cmdtext"/pb") == 1)
     {
         (
TEAM_Bronzevip(playerid));
         
SetPlayerHealth(playerid100.0);
         
SetPlayerArmour(playerid100.0);
         
GivePlayerWeapon(playerid26999999);
         return 
1;
     }
     return 
0;

You didn't get what he meant, you're using Team_Bronzevip, when you defined it TEAM_Bronzevip.
Reply
#7

Код:
undefined symbol "TEAM_Bronzevip"
Reply
#8

if you want you can change it i just want bronzevip be able to use the command thats the main point
Reply
#9

you defined TEAM_Bronzevip to nothing. bronze, silver, gold and platinum are defined as.. nothing. thats 0. i set the bronze to 1, silver to 2 etc. and i was so free to change your colors according to the rank...
Код:
#include <a_samp>

#if defined FILTERSCRIPT
new gTeam[MAX_PLAYERS];
#define TEAM_Bronzevip 1
#define TEAM_Silvervip 2
#define TEAM_Goldvip 3
#define TEAM_Platinum_Vip 4
#define Bronze_vip_COLOUR 0xcc5500FF
#define Silver_vip_COLOUR 0xccccccFF
#define Gold_vip_COLOUR 0xFFcc00FF
#define Platinum_vip_COLOUR 0xccccFFFF

public OnPlayerCommandText(playerid, cmdtext[])
{
	if(strcmp(cmdtext, "/pb") == 1)
	{
		new string[128];
		switch(gTeam[playerid])
		{
			case TEAM_Bronzevip:
			{
				SetPlayerHealth(playerid, 100.0);
				SetPlayerArmour(playerid, 100.0);
				GivePlayerWeapon(playerid, 26, 999999);
				format(string,sizeof(string),"Bronze Healed+Weapon");
				SendClientMessageToPlayer(playerid,Bronze_vip_COLOUR,string);
			}
			case TEAM_Silvervip:
			{
				SetPlayerHealth(playerid, 100.0);
				SetPlayerArmour(playerid, 100.0);
				GivePlayerWeapon(playerid, 26, 999999);
				format(string,sizeof(string),"Silver Healed+Weapon");
				SendClientMessageToPlayer(playerid,Silver_vip_COLOUR,string);
			}
			case TEAM_Goldvip:
			{
				SetPlayerHealth(playerid, 100.0);
				SetPlayerArmour(playerid, 100.0);
				GivePlayerWeapon(playerid, 26, 999999);
				format(string,sizeof(string),"Gold Healed+Weapon");
				SendClientMessageToPlayer(playerid,Gold_vip_COLOUR,string);
			}
			case TEAM_Platinum_Vip:
			{
				SetPlayerHealth(playerid, 100.0);
				SetPlayerArmour(playerid, 100.0);
				GivePlayerWeapon(playerid, 26, 999999);
				format(string,sizeof(string),"Platinum Healed+Weapon");
				SendClientMessageToPlayer(playerid,Platinum_vip_COLOUR,string);
			}
		}
		return 1;
	}
	return 0;
}
if you want only bronze to be able to "recieve" something, then simply erase the case:{...} of the non-wanted ranks.
Reply
#10

I'm slightly confused about this situation:

(TEAM_Bronzevip(playerid));

Why would it have additional brackets with no real pre-evaluation needed..... seems pointless?

So you have this TEAM_Bronzevip #define, but your using it like a function? That would be the problem, from what I can see at least.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)