Tutorial system - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Tutorial system (
/showthread.php?tid=493808)
Tutorial system -
SoulLedger - 09.02.2014
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.
Re: Tutorial system -
Kirollos - 10.02.2014
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
Re: Tutorial system -
SoulLedger - 10.02.2014
Thank you soo much, it works well now