Difference behavior between @ and []

Posted: 30 Apr 2022 03:01
by bugger

Difference behavior between @ and []
Test bellow command
TEST A Click need 4time
TEST B Click need 7time (We need click at [] )
I dont want to click at [] (Because nothing to do with Game Scene )
How do we ignore click at []?

TEST A
hello
@set a=1
hello
@set a=2
hello

TEST B
test2
hello
[set a=1]
hello
[set a=2]
hello


Re: Difference behavior between @ and []

Posted: 30 Apr 2022 06:44
by idaot

[] are meant to be used within generic text lines and not on their own lines. @ are to be put on their own line. https://naninovel.com/guide/naninovel-s ... d-inlining

In this case, you should not put [] in their own lines, use @ instead.


Re: Difference behavior between @ and []

Posted: 30 Apr 2022 12:29
by bugger

Thank you for reply, I hope for improvement

Other Novel Script

You Killed Enemy!
You Skiled UP
[Set Exp+=1][SetSkill+=1][SetMagic+=1][SetPower+=1][SetPower+=1][Set Gold+=100]
[if Exp>=300][set Level+=1][endif]

You Leveled up!! {Exp}Exp,{Skil}Skil.......

NaniNovel Script ######## Not labor-saving

You Killed Enemy!
You Skiled UP
@setExp+=1
@setSkill+=1
@setMagic+=1
@setPower+=1
@setGold+=100
@if
@Exp>=300
@set Level+=1
@endif

You Leveld up {Exp}Exp,{Skil}Skil.......


Re: Difference behavior between @ and []

Posted: 30 Apr 2022 15:47
by idaot

You can always use @gosub to reuse bits of code.
https://naninovel.com/api/#gosub

Alternatively consider creating a custom command.