wc3campaigns
WC3C Homepage - www.wc3c.netUser Control Panel (Requires Log-In)Engage in discussions with other users and join contests in the WC3C forums!Read one of our many tutorials, ranging in difficulty from beginner to advanced!Show off your artistic talents in the WC3C Gallery!Download quality models, textures, spells (vJASS/JASS), systems, and scripts!Download maps that have passed through our rigorous approval process!

Go Back   Wc3C.net > Warcraft III Modding > Developer's Corner > General Development
User Name
Password
Register Rules Get Hosted! Chat Pastebin FAQ and Rules Members List Calendar



Reply
 
Thread Tools Search this Thread
Old 04-04-2017, 02:33 PM   #1
yeeboys
User
 
Join Date: Oct 2013
Posts: 19

yeeboys has little to show at this moment (0)

Default A zinc error

this is a part of zinc library. error in the text "Preload("\");"
Thanks for answering my question.
Collapse JASS:

//! zinc
library SLLib{

private function SyncInteger( gamecache gcache,integer mainkey,integer childkey,integer digit )
    string mkstr = I2S(mainkey);
    string ckstr = I2S(childkey);
    integer origin = GetStoredInteger(gcache, mkstr , ckstr );

    StoreInteger(gcache , mkstr , ckstr, digit);
    SyncStoredInteger(gcache , mkstr , ckstr );
    StoreInteger(gcache , mkstr ,ckstr , origin);



function SaveFile(string filename,gamecache gcache)
     integer mainkey;
     integer dcount;
     integer dindex;
     integer origin;
     mainkey = GetPlayerId(GetLocalPlayer())+1 ;
     dcount = GetStoredInteger(gcache,I2S(mainkey) ,"0");
     PreloadGenClear();
     PreloadGenStart();
     Preload("\");
     SetPlayerTechMaxAllowed(Player(12),0,"+I2S(dcount)+")//");
     
     Preload("\")  ;
    return//") ;
     PreloadGenEnd(filename);



}
//! endzinc

Attached Images
File Type: jpg zinc error.jpg (97.5 KB, 9 views)
yeeboys is offline   Reply With Quote
Sponsored Links - Login to hide this ad!
Old 04-04-2017, 11:36 PM   #2
Fledermaus
default string
 
Fledermaus's Avatar
 
Join Date: May 2006
Posts: 705

Submissions (1)

Fledermaus is a jewel in the rough (194)Fledermaus is a jewel in the rough (194)Fledermaus is a jewel in the rough (194)

Send a message via MSN to Fledermaus
Default

I think it needs to be a double slash \\. \" is how you use a quote mark inside a string so that string from the preload is never actually being closed until part way through the next line - take a look at the syntax highlighting in your post.

Also the quotes in that SetPlayerTechMaxAllowed(Player(12),0,"+I2S(dcount)+")//"); line just look wrong in general.

Edit: I guess you're trying to do the preloader trick? What exactly are you trying to write to the file with it?
I still think the issue is with the quotes in general.

Last edited by Fledermaus : 04-06-2017 at 09:27 AM.
Fledermaus is offline   Reply With Quote
Old 04-14-2017, 04:56 AM   #3
yeeboys
User
 
Join Date: Oct 2013
Posts: 19

yeeboys has little to show at this moment (0)

Default

Quote:
Originally Posted by Fledermaus
I think it needs to be a double slash \\. \" is how you use a quote mark inside a string so that string from the preload is never actually being closed until part way through the next line - take a look at the syntax highlighting in your post.

Also the quotes in that SetPlayerTechMaxAllowed(Player(12),0,"+I2S(dcount)+")//"); line just look wrong in general.

Edit: I guess you're trying to do the preloader trick? What exactly are you trying to write to the file with it?
I still think the issue is with the quotes in general.

I try to write that
Collapse JASS:
    
     Preload("\\");
     SetPlayerTechMaxAllowed(Player(12),0,"+I2S(dcount)+")//");
     Preload("\\")  ;
    return//") ;
also sent error at Preload("\\");

but i write by vjass that
Collapse JASS:
    call Preload("\")
    call SetPlayerTechMaxAllowed(Player(13,0,"+I2S(dcount)+")//")
    call Preload("\")
    return//")
is right.

So i don't understand why zinc syntax error.
yeeboys is offline   Reply With Quote
Old 04-19-2017, 06:09 PM   #4
Anitarf
Procrastination Incarnate


Development Director
 
Join Date: Feb 2004
Posts: 8,189

Submissions (19)

Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)

2008 Spell olympics - Fire - SilverApproved Map: Old School Alliance TacticsHero Contest #2 - 3rd PlaceSpell making session 2 winner

Default

This was my experience as well, I could get the trick to work in vJass but not in zinc. I guess it's a problem with the zinc compiler, it doesn't let you do all the tricks that the vJass compiler does. In the end, I just wrote my library in vJass instead of zinc, they are cross-compatible anyway.
__________________
Anitarf is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off


All times are GMT. The time now is 02:51 PM.


Affiliates
The Hubb The JASS Vault Clan WEnW Campaign Creations Clan CBS GamesModding Flixreel Videos

Powered by vBulletin (Copyright ©2000 - 2019, Jelsoft Enterprises Ltd).
Hosted by www.OICcam.com
IT Support and Services provided by Executive IT Services