getting errors?
#1

this is the code under onplayerdissconect:

Код:
  if(logged[playerid] = 1){
  new file[128], pname[MAX_PLAYER_NAME], plrIP[16];
  GetPlayerName(playerid, pname, sizeof(pname));
  format(file, sizeof(file), "\\Users\\%s.ini", pname);
  GetPlayerIp(playerid, plrIP, sizeof(plrIP));
  dini_IntSet(file, "IP", plrIP);
  }
this is errors:

Код:
C:\Users\user\Desktop\Everything World\gamemodes\EverythingWorldTwoBeta.pwn(228) : warning 211: possibly unintended assignment
C:\Users\user\Desktop\Everything World\gamemodes\EverythingWorldTwoBeta.pwn(233) : error 035: argument type mismatch (argument 3)
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Код:
Line 228 = if(logged[playerid] = 1){
Line 233 = dini_IntSet(file, "IP", plrIP);
Reply
#2

Quote:
Originally Posted by [mad
MLK (dino-host.com) ]
this is the code under onplayerdissconect:

Код:
  if(logged[playerid] = 1){
  new file[128], pname[MAX_PLAYER_NAME], plrIP[16];
  GetPlayerName(playerid, pname, sizeof(pname));
  format(file, sizeof(file), "\\Users\\%s.ini", pname);
  GetPlayerIp(playerid, plrIP, sizeof(plrIP));
  dini_IntSet(file, "IP", plrIP);
  }
this is errors:

Код:
C:\Users\user\Desktop\Everything World\gamemodes\EverythingWorldTwoBeta.pwn(228) : warning 211: possibly unintended assignment
C:\Users\user\Desktop\Everything World\gamemodes\EverythingWorldTwoBeta.pwn(233) : error 035: argument type mismatch (argument 3)
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Код:
Line 228 = if(logged[playerid] = 1){
Line 233 = dini_IntSet(file, "IP", plrIP);
i dont use dini but your first error is beacuse its a single = should be
pawn Код:
if(logged[playerid] == 1){
Reply
#3

Quote:
Originally Posted by [mad
MLK (dino-host.com) ]
this is the code under onplayerdissconect:

(code)
Wrong section, this is not 0.3-specific.

Shady91 corrected your first error (well, warning), the second is most likely because IP (or, "plrIP" in your case) is a string, not an integer; use dini_Set instead.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)