Jump to content

Unexpected parsing error


berelinde

Recommended Posts

I'm getting a syntax error when executing this script block. Could someone tell me what I'm doing wrong?

 

IF

InParty(Myself)

Global("B!GavinFriendMatch","GLOBAL",1) // FRIENDSHIP

!Global("B!GavinFriend","GLOBAL",2)

!GlobalGT("B!GavinRomanceActive","GLOBAL",0)

GlobalGT(B!GavinFriend","GLOBAL",0) // B!GavinOffend keeps counting even if the relationship or friendship is over

GlobalGT("B!GavinOffend","GLOBAL",6)

THEN

RESPONSE #100

SetGlobal("B!GavinOffenseWarning","GLOBAL",1) // triggers warning

StartDialogNoSet(Player1)

END

 

It's giving it to me at line 8 columns 10-25

The line is

!GlobalGT("B!GavinRomanceActive","GLOBAL",0)

The column is "B!GavinRomanceActive","

 

This was the message in the debug:

 

[GAVIN/BAF/B!GavinFriendBreaks.baf] PARSE ERROR at line 8 column 10-25

Near Text: ","

syntax error

 

 

I use this format throughout this BAF and a similar one elsewhere, so I need to get it right.

 

 

Edit: by the gods, I hate it when I spot it after I've posted. But I'll leave it as a lesson to others. I forgot a ".

Link to comment

GlobalGT(B!GavinFriend","GLOBAL",0)

should be

 

GlobalGT("B!GavinFriend","GLOBAL",0)

:)

 

and you got it just as i posted.

 

The funniest thing I ever had happen learning this stuff was as a completely new person, posting up hundreds of lines of corrected soundsets, for the PID stringfixers. Many, many lines of code all looking like

SetPlayerSound(Myself,%[YESLICK 22] Be glad to.% [_YESLK22],37)

Icelus came by with a one liner --

 

"You missed a percent sign."

 

 

I didn't get it right away, and he had to patiently explain to me that he was joking :)

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...