mIRC Home    About    Download    Register    News    Help

Print Thread
#256193 28/12/15 06:47 AM
Joined: Jun 2015
Posts: 84
F
Babel fish
OP Offline
Babel fish
F
Joined: Jun 2015
Posts: 84
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.
Code:
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
}

Joined: Sep 2014
Posts: 52
Babel fish
Offline
Babel fish
Joined: Sep 2014
Posts: 52
There is an error on line 4. Replace:
Code:
JSONOpen -u %j https://api.twitch.tv/kraken/channels/ $+ $nick $+ ?= $rand(1,100000)

with:
Code:
JSONOpen -u %j https://api.twitch.tv/kraken/channels/ $+ $nick $+ ?= $+ $rand(1,100000)

Last edited by paper0rplastic; 28/12/15 10:13 AM.

Link Copied to Clipboard