Compile error GM : RPG MODE TOMMY -
Frikandel - 14.05.2009
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
Re: Compile error GM : RPG MODE TOMMY -
Joe Staff - 15.05.2009
it's a warning not an error, means it doesn't matter.
Re: Compile error GM : RPG MODE TOMMY -
Backwardsman97 - 15.05.2009
It does kinda matter. It will help you catch logic errors.
Re: Compile error GM : RPG MODE TOMMY -
Frikandel - 15.05.2009
Ok, but what must i do to fix it
Re: Compile error GM : RPG MODE TOMMY -
Yuval_Baruch - 15.05.2009
since your not using this value you can delete it or you can comment it (//)
or you can also use it somewhere ..
Re: Compile error GM : RPG MODE TOMMY -
Frikandel - 15.05.2009
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;
Re: Compile error GM : RPG MODE TOMMY -
AutoSized - 15.05.2009
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.
Re: Compile error GM : RPG MODE TOMMY -
Frikandel - 15.05.2009
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
Re: Compile error GM : RPG MODE TOMMY -
Ignas1337 - 15.05.2009
if similair warning presists and if it's a function which is called by a timer, then use
#pragma unused 'functionName'
without the ' and '