I've been getting a quote system together, but the issue I'm encountering is.
When adding a quote it does this.
writeini -n %file $ctime quote %quote
writeini -n %file $ctime game %currentGame
writeini -n %file $ctime addedby %displayName
and when editing I wanted to add an extra line
writeini -n %file $ini(%file,$2) quote %eQuote
writeini -n %file $ini(%file,$2) editedby %displayName
I'm encountering an insufficient permissions on the line where it would add the editedby to it.
Am I overlooking something?
Code for Reference.
on *:text:!editquote*:#fonic_artes: {
var %file = data\quotes\quotes_ $+ $mid(#,2) $+ .ini
var %j = displayName
JSONOpen -u %j https://api.twitch.tv/kraken/channels/ $+ $nick $+ ?= $rand(1,100000)
var %displayName = $json(%j,display_name)
var %eQuote = $3-
var %header = $ini(%file,$2)
if (!$read("data\OP List.txt", nw, $nick)) { msg # /me - You cannot edit quotes. }
if ($2 > $ini(%file,0)) { msg # /me - I cannot edit a quote that doesn't exist. }
if ($3- == $null) { msg # /me - If you're going to edit a quote, at least provide a replacement. }
else {
writeini -n %file %header quote %eQuote
writeini -n %file %header editedby %displayName
msg # /me - Quote $chr(35) $+ $2 has been edited.
}
JSONClose
}