Help ME OUT
#1

Hello Friends
ERROR:
Код:
F:\*****\Tester\filterscripts\GangSystem.pwn(1426) : error 017: undefined symbol "total"
F:\*****\Tester\filterscripts\GangSystem.pwn(1427) : error 017: undefined symbol "playerid"
F:\*****\Tester\filterscripts\GangSystem.pwn(1429) : error 017: undefined symbol "playerid"
F:\*****\Tester\filterscripts\GangSystem.pwn(1430) : error 017: undefined symbol "i"
LINE:
Код:
1426:format(msg, sizeof(msg), "{FFFFFF}[{FFA000}GANG{FFFFFF}] {00FFB4}Your gang successfully captured '%s' with %d alive player(s)!", GangZone[zoneid][ZoneName],total);
1427:SendGangMessage(Player[playerid][PlayerGang], msg);
1428:format(msg, sizeof(msg), "{FFFFFF}[{FFA000}GANG{FFFFFF}] {00FFB4}The gang gained 7 gang score and each member $20,000 who were tied.");
1429:SendGangMessage(Player[playerid][PlayerGang], msg);
1430:format(msg, sizeof(msg), "{FFFFFF}GEF {FFA000} Gang %s captured zone '%s' which was territory of %s", Gang[gangid][GangName], GangZone[zoneid][ZoneName], GangZone[i][ZoneOwner]);
Help Me Friends
How to solve
Reply
#2

Where is defined the variable total and i and where did you pated the code?
Reply
#3

Код:
stock bool:CheckGang(gangid)
{
	new total = 0, query[128];
	mysql_format(connection, query, sizeof(query), "SELECT count(*) AS `total` FROM `member` WHERE `gang` = %d", Gang[gangid][GangID]);
	mysql_query(connection, query, true);
	total = (cache_num_rows() > 0) ? cache_get_field_content_int(0, "total") : 0;
	return (total >= MAX_GANG_MEMBER) ? false : true;
}
Reply
#4

"total" is created as local variable, so it can be used only in the stock! You have to create it as global one (at the top of your script). Also "i" is not defined!
Reply
#5

hey you have discord
bro my name and tag is this
Marv#0002
message is once bro
Reply
#6

Код:
F:\************\Tester\filterscripts\GangSystem.pwn(1426) : error 017: undefined symbol "playerid"
F:\************\Tester\filterscripts\GangSystem.pwn(1428) : error 017: undefined symbol "playerid"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
Код:
SendGangMessage(Player[playerid][PlayerGang], msg);
SendGangMessage(Player[playerid][PlayerGang], msg);
same line
Reply
#7

Quote:
Originally Posted by Marv123
Посмотреть сообщение
Код:
F:\************\Tester\filterscripts\GangSystem.pwn(1426) : error 017: undefined symbol "playerid"
F:\************\Tester\filterscripts\GangSystem.pwn(1428) : error 017: undefined symbol "playerid"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
Код:
SendGangMessage(Player[playerid][PlayerGang], msg);
SendGangMessage(Player[playerid][PlayerGang], msg);
same line
you probably, not passing playerid in this function
Reply
#8

Quote:
Originally Posted by iorp
Посмотреть сообщение
you probably, not passing playerid in this function
how to fix it bro
Reply
#9

The identification of the player in the callback was not defined. Show your complete code (callback)
Reply
#10

@Undef1ned bro you have discord if you have can you tell name and tag
Reply
#11

show the function code, where you are using these calls
Reply
#12

Instead of just throwing up the code how everyone tells you to, maybe learn what is scripting and then fix this small issue your self. All what it needs is some knowledge.
Reply
#13

Quote:
Originally Posted by Logic_
Посмотреть сообщение
Instead of just throwing up the code how everyone tells you to, maybe learn what is scripting and then fix this small issue your self. All what it needs is some knowledge.
you're wrong, speed & code spooning is key sir thank!
Reply


Forum Jump:


Users browsing this thread: 5 Guest(s)