GetPlayerName help.
#1

pawn Код:
GetPlayerName(playerid,Nam,sizeof(Nam));
                    if(strlen(inputtext) == Nam) return SCM(playerid,red,"ERROR: You can't wire transfer to your self");
Код:
error 033: array must be indexed (variable "Nam")
(if(strlen(inputtext) == Nam) return SCM(playerid,red,"ERROR: You can't wire transfer to your self");)
Reply
#2

use strfind ?
pawn Код:
GetPlayerName(playerid,Nam,sizeof(Nam));
                    if(strfind(inputtext) == Nam) return SCM(playerid,red,"ERROR: You can't wire transfer to your self");
Reply
#3

same line
Код:
C:\Users\Owner\SA-MP\gamemodes\xG.pwn(9774) : warning 202: number of arguments does not match definition
C:\Users\Owner\SA-MP\gamemodes\xG.pwn(9774) : error 033: array must be indexed (variable "Nam")
Reply
#4

Tanush, I haven't coded PAWN in months but I think this will work lol
pawn Код:
GetPlayerName(playerid,Nam,sizeof(Nam));
if(!strcmp(Nam,inputtext,false)) return SCM(playerid,red,"ERROR: You can't wire transfer to your self");
Reply
#5

Thank you tee
Reply
#6

You're welcome I could've just posted it to you on Skype but if I did others with a similar problem wouldn't find out how you fixed it.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)