#1

Код:
C:\Documents and Settings\Saturn\Desktop\OnDeath.pwn(19) : error 017: undefined symbol "PlayerName"
C:\Documents and Settings\Saturn\Desktop\OnDeath.pwn(19) : warning 215: expression has no effect
C:\Documents and Settings\Saturn\Desktop\OnDeath.pwn(19) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\Saturn\Desktop\OnDeath.pwn(19) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Saturn\Desktop\OnDeath.pwn(19) : fatal error 107: too many error messages on one line
How can i fix this?
Line 19 :
Код:
	format(string, sizeof(string), "KILL: %s has killed %s with a %s in the tutorial area.", PlayerName(killerid), PlayerName(playerid), GunNames[reason];
Reply
#2

It seems you have the PlayerName function missing from the script.

PHP код:
PlayerName(playerid)
{
    new
        
Name[MAX_PLAYER_NAME];

    
GetPlayerName(playeridNamesizeof(Name));
    return 
Name;

Place this somewhere in your script.
Reply
#3

Quote:
Originally Posted by kleantzhubi
Посмотреть сообщение
Код:
C:\Documents and Settings\Saturn\Desktop\OnDeath.pwn(19) : error 017: undefined symbol "PlayerName"
C:\Documents and Settings\Saturn\Desktop\OnDeath.pwn(19) : warning 215: expression has no effect
C:\Documents and Settings\Saturn\Desktop\OnDeath.pwn(19) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\Saturn\Desktop\OnDeath.pwn(19) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Saturn\Desktop\OnDeath.pwn(19) : fatal error 107: too many error messages on one line
How can i fix this?
Line 19 :
Код:
	format(string, sizeof(string), "KILL: %s has killed %s with a %s in the tutorial area.", PlayerName(killerid), PlayerName(playerid), GunNames[reason];
Add function your gamemode:
PHP код:
stock PlayerName(playerid) {
    new 
         
name[MAX_PLAYER_NAME]
    ;
    
GetPlayerName(playeridnamesizeof(name));
    return 
name;

Reply
#4

@sjn and Logofero;Still not working :/...
Код:
C:\Documents and Settings\Saturn\Desktop\OnDeath.pwn(19) : error 017: undefined symbol "GunNames"
C:\Documents and Settings\Saturn\Desktop\OnDeath.pwn(19) : warning 215: expression has no effect
C:\Documents and Settings\Saturn\Desktop\OnDeath.pwn(19) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\Saturn\Desktop\OnDeath.pwn(19) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Saturn\Desktop\OnDeath.pwn(19) : fatal error 107: too many error messages on one line
Reply
#5

Quote:
Originally Posted by kleantzhubi
Посмотреть сообщение
@sjn;Still not working :/...
Код:
C:\Documents and Settings\Saturn\Desktop\OnDeath.pwn(19) : error 017: undefined symbol "GunNames"
C:\Documents and Settings\Saturn\Desktop\OnDeath.pwn(19) : warning 215: expression has no effect
C:\Documents and Settings\Saturn\Desktop\OnDeath.pwn(19) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\Saturn\Desktop\OnDeath.pwn(19) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Saturn\Desktop\OnDeath.pwn(19) : fatal error 107: too many error messages on one line
How do you just take someone alien code, do not even understand it.
Reply
#6

Instead of using that function to fetch the weapon name, why don't you just use GetWeaponName function inside OnPlayerDeath? Cause you are running a code with some small missing stock functions. If you can't find the functions anywhere.

https://sampwiki.blast.hk/wiki/GetWeaponName
Reply
#7

LOL i fixed,but i have other errors
Код:
C:\Documents and Settings\Saturn\Desktop\PR-RP fixed\gamemodes\OnDeath.pwn(10) : error 017: undefined symbol "GetPlayerPos"
C:\Documents and Settings\Saturn\Desktop\PR-RP fixed\gamemodes\OnDeath.pwn(11) : error 017: undefined symbol "GetPVarInt"
C:\Documents and Settings\Saturn\Desktop\PR-RP fixed\gamemodes\OnDeath.pwn(11) : error 017: undefined symbol "Baller"
C:\Documents and Settings\Saturn\Desktop\PR-RP fixed\gamemodes\OnDeath.pwn(11) : warning 215: expression has no effect
C:\Documents and Settings\Saturn\Desktop\PR-RP fixed\gamemodes\OnDeath.pwn(11) : error 017: undefined symbol "SetPlayerWorldBounds"
C:\Documents and Settings\Saturn\Desktop\PR-RP fixed\gamemodes\OnDeath.pwn(11) : fatal error 107: too many error messages on one line
Reply
#8

Its more likely you have a_players.inc missing from your includes folder. Cause a_players is already included in a_samp.inc so when you include a_samp it should include a_players as well. Make sure you have all the includes from samp server package added inside includes folder.

These undefined symbols are appearing cause these functions are defined inside a_players.inc and you have the include missing.
Reply
#9

I think I can safely assume no-one is noticing the Copy Pasting...



If you are going to rip the crap out of a script, make sure you understand HOW to make it work.

Don't just come in here posting the errors HOPING that people will continue to go through the 20 - 30 incremental errors, that you come back at each step with "Fixed it, but now this happens"...



What it is, is you're copying portions of scripts, and not understanding how they work.

You need to learn to script a bit. (At least enough to understand the errors, and how the functions are created and such)



Next, as soon as the next error is fixed, he'll hang on "Baller"... And then once he "figures" that one, we'll end up with another...
Reply
#10

Quote:
Originally Posted by Sew_Sumi
Посмотреть сообщение
I think we can safely assume no-one is noticing what people are saying about Copy Pasting...



If you are going to rip the crap out of a script, make sure you understand HOW to make it work.

Don't just come in here posting the errors HOPING that people will continue to go through the 20 - 30 incremental errors, that you come back at each step with "Fixed it, but now this happens"...



What it is, is you're copying portions of scripts, and not understanding how they work.

You need to learn to script a bit. (At least enough to understand the errors, and how the functions are created and such)



Next, as soon as the next error is fixed, he'll hang on "Baller"... And then once he "figures" that one, we'll end up with another...
I agree with this, before expecting stuffs to work properly, you should make sure all the required stuffs are set up properly. And know what you are really going to do.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)