18.03.2012, 02:46
Alright. I'm getting a few errors for the same line. Not sure how to solve them. I'm trying to get this function to alert players on the server of high ping. (Annoying function? yes i know but its a small server trololol.) I believe I'm handling the name variable wrong. I've included a_players and put this all under public pingchecktimer(playerid).
Code
Errors
What do I need to do to define pName? And what is causing line 238 to be assumed zero?
Any help is appreciated!
Code
Код:
237| if(GetPlayerPing(playerid) > 350) 238| GetPlayerName(playerid, pName, sizeof(pName[MAX_PLAYER_NAME])); 239| format(string,sizeof(string), "Warning: %s is playing with a high ping of %s.", pName, GetPlayerPing(playerid)); 240| SendClientMessageToAll (0x550000FF, string);
Код:
C:\Users\Dennis\Desktop\SAMP\Servers\roleplay by me\gamemodes\roleplay.pwn(238) : error 017: undefined symbol "pName" C:\Users\Dennis\Desktop\SAMP\Servers\roleplay by me\gamemodes\roleplay.pwn(238) : error 017: undefined symbol "pName" C:\Users\Dennis\Desktop\SAMP\Servers\roleplay by me\gamemodes\roleplay.pwn(238) : error 029: invalid expression, assumed zero C:\Users\Dennis\Desktop\SAMP\Servers\roleplay by me\gamemodes\roleplay.pwn(238) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors.
Any help is appreciated!