OK, so for a couple of the scripts I have tried that check to see if you are the GM, I get the error message "Only The GM can run this command" I have seen this for the /Initall command and for the script that shows the individual dice rolls so far. I am the GM and it even Says "The GM says" in the chat line when I chat
Anyone seen this? Any ideas?
Thanks
Zandel
Comments
Try pressing F9 to refresh your scripts... then try the /init stuff again... Make sure you set up the inits as well by using:
/initdice
Then login as a player and try using the:
/initmod command
then as the GM use:
/initall
hope this helps.
It some how is failing when it tests to see if I am the GM
When you logged into your Computer (not ScreenMonkey), are you the Admin? Not sure if that has anything to do with it, but it cant hurt. If not, try doing that and then testing your scripts.
*editing my own post*
Here is one way to test if you are the GM:
curSession = GetCurrentSession()
gm = curSession.GM
If "gm" is null - then you are not the GM. Here is another:
curPlayer = GetCurrentPlayer()
if( curPlayer.IsGM )then
Both ways will let you know if you are the GM. How are you doing it?
Sub ClearInits
cs = GetChatSession()
ci = cs.GetLastItem()
os = GetCurrentSession()
op = GetCurrentPlayer()
If op.IsGM Then
os.Sync
n = os.GetSyncCharCount()
For i = 1 to n
c = os.GetSyncChar( i)
sInit = c.GetField( "initroll")
If Len( Trim( sInit)) > 0 Then
c.SetField "initroll", ""
End If
Next
ci.Action = "reports"
ci.Text = "initiatives cleared"
Else
ci.PlayerTo = ci.PlayerFrom
ci.Text = "<i>[Sorry, only the GM can clear the initiatives!]</i>"
End If
End Sub
I can see its checking in the script and I am obviously taking the Else branch because thats whats getting returned, the thing I can't figure out is why, I am running the DM client not logging in as a player. The other perplexing part is it returns "TheGM says: [Sorry, only the GM can clear the initiatives!]" so TheGM says leads to believe that the player would be TheGM
Files\nbos\ScreenMonkey\Campaigns\Default\screenmonkey.cgi action=62&player=The+GM&password=xxxxxxxx&chattext=/clearinits&ts=12590879595