Compile error GM : RPG MODE TOMMY
#1

Hi when i compile he give a error ?

It's the RPG MODE OF TOMMY!!!

Код:
C:\Documents and Settings\Gebruiker\Bureaublad\samp02Xserver.win32\gamemodes\rpgmode.pwn(1106) : warning 204: symbol is assigned a value that is never used: "playerspawnedsize"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Warning.
on line 1106 is this
Код:
new playerspawnedsize = playerspawned+1;
please can you tell me what the problem is,, thx
Reply
#2

it's a warning not an error, means it doesn't matter.
Reply
#3

It does kinda matter. It will help you catch logic errors.
Reply
#4

Ok, but what must i do to fix it
Reply
#5

since your not using this value you can delete it or you can comment it (//)
or you can also use it somewhere ..
Reply
#6

here is it..

Код:
	if(mission == 2){
	new strings[256];
	new name[256];
	new playerspawnedsize = playerspawned+1;
	new objectivevictim = random(sizeof(/*playerspawnedsize*/));
	GetPlayerName(objectivevictim, name, 256);
	GameTextForPlayer(playerid,"Mission 2: KILL HIM!",1000,3);
	format(strings, 256, "[MISSION] Kill %s! [in zone %s]", name, zones[player_zone[objectivevictim]][zone_name]);
	SendClientMessage(playerid, COLOR_GREEN, strings);
	wantedforhim[playerid] = objectivevictim;
 	 }
is this then good

Код:
	if(mission == 2){
	new strings[256];
	new name[256];
//	new playerspawnedsize = playerspawned+1;
	new objectivevictim;
	GetPlayerName(objectivevictim, name, 256);
	GameTextForPlayer(playerid,"Mission 2: KILL HIM!",1000,3);
	format(strings, 256, "[MISSION] Kill %s! [in zone %s]", name, zones[player_zone[objectivevictim]][zone_name]);
	SendClientMessage(playerid, COLOR_GREEN, strings);
	wantedforhim[playerid] = objectivevictim;
 	 }
Код:
//	new playerspawnedsize = playerspawned+1;
	new objectivevictim;
Reply
#7

It should get rid of the warning but it might be needed for the code to work properly. I don't know the game mode but would also question why

pawn Код:
new objectivevictim = random(sizeof(/*playerspawnedsize*/));
was commented out also.
Reply
#8

I have this and h compile now good
Код:
//	new playerspawnedsize = playerspawned+1;
	new objectivevictim;
he compile good :

Код:
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase
Reply
#9

if similair warning presists and if it's a function which is called by a timer, then use
#pragma unused 'functionName'
without the ' and '
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)