Tutorial system
#1

Hello all,

I am working on a custom RP script for a server but I ma having some trouble with one code, I am working on a dialog where you input your characters age and then it will implement it into the database (which is mysql) and the error says "error 006: must be assigned to an array", the code is "pInfo[playerid][pAge] = inputtext;" should I have something in it to work it like a new etc.
Reply
#2

pInfo[playerid][pAge] = strval(inputtext);

strval simply converts a string into an integer.

inputtext is a string so using strval converts the input of the dialog into an integer.

More info here: https://sampwiki.blast.hk/wiki/Strval
Reply
#3

Thank you soo much, it works well now
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)