Archived copy of warcraft-source.com, the Warcraft: Source (WCS) forum (2007–2011), rebuilt from the Internet Archive by wc3mods.net. This page was captured on 2009-09-25 (original capture). Home · Forum · All archived topics · Downloads
Warcraft-Source.com - WCS mod for CSS
September 25, 2009, 11:46:55 PM *
Welcome, Guest. Please login or register.
Login with username, password and session length
News: Join the new Facebook Warcraft-Source.com Group! It has been currently opened!
Join!
Google  
  Home   Forum   Help Search Login Register   *
Pages: [1]   Go Down
  Print  
Current Topic Rating: ***** You have not rated this topic. Select a rating:
Author Topic: GUIDE to Fixing Races Issues! (Races not showing, unreadable code, etc.)  (Read 249 times)
Tallon
Level 0 Beginner

Offline Offline

United States United States

Posts: 17



WWW
Tallon777
« on: November 20, 2008, 08:06:27 AM »

Moderators please Sticky this and include into your guide for noobs-devs please I believe it will help a lot of people.



GUIDE to Problem Solving Races Issues!

Including problems dealing with:
1. Races not showing on the server.
2. Races Not working (same as number 1.)
3. Skills not working (Not Complete Yet)
4. Server Crashing.
5. Code unreadable.
6. Code Messy (same as 5.)
7. Laggy Server, Races, Skills.




Make sure your code has:
Code
GeSHi (eventscripts):
 
"WCSraces"
 
{
 
"1"
{
 
in the beggining! that tells WCS to load the Code (races) in the file.


Then Check to make sure that you have At least FOUR Quotes per Code.
Examples of Code:

Code
GeSHi (eventscripts):
//Examples of Good Code:
1."skill1_setting"   "es_xsetinfo wcs_chance 55|es_xsetinfo wcs_chance 60|es_xsetinfo wcs_chance 65|es_xsetinfo wcs_chance 70"
 
2."name"   "Shadow Of The Void"
 
//Examples of Bad Code:
1."name"   "Shadow Of The Void
2."name"    Shadow Of The Void"
3."name    "Shadow Of The Void"
4. name"   "Shadow Of The Void"
If you leave even one Quote out then you will have problems loading the rest of the races after that quote (HINT: if your race file breaks off at 22 races when you have 30 races in your file then your problem is somewhere around race 22-23) or your races file will not load at all!



After you check these things, your next step would be to see if the script has Broken Codes such as an accidental touch of your return/enter key.
It can also happen when:

1. Using a bad program, (sometimes when you save in "Notepad", or "Wordpad" this WILL happen) I recommend using PSPad, or Notepad++. Both are Very good, and there are others out there, but it's a personal preference to which you prefer. Both have advantages, and disadvantages.

2. Uploading the es_WCSraces_db.txt file to your server (If it's an external Host) using a FTP program that has not been updated, or is not using the proper uploading/downloading format. I believe (Encoding:) UTF-8 and Unicode are ideal (However I am NOT sure which. I forget! maybe the Pro'es here can tell me).

3. and Saving in one of the Encoding way can also break code, I just dont know which.

4. Some programs automatically format your code when saved, or while being worked on. Double Check these things in the program you are using.

Example of Bad Code because of the above problems.
Code
GeSHi (eventscripts):
"skill3_setting"   "
es_xrand wcs_rand 1 74;es_xsetinfo wcs_money 100
|es_xrand wcs_rand 1 71;es_xsetinfo wcs_money 150
|es_xrand wcs_rand 1 68;es_xsetinfo wcs_money 200
|es_xrand wcs_rand 1 65;es_xsetinfo wcs_money 250
|es_xrand wcs_rand 1 62;es_xsetinfo wcs_money 300"
Example of Good Code
Code
GeSHi (eventscripts):
"skill3_setting"   "es_xrand wcs_rand 1 74;es_xsetinfo wcs_money 100|es_xrand wcs_rand 1 71;es_xsetinfo wcs_money 150|es_xrand wcs_rand 1 68;es_xsetinfo wcs_money 200|es_xrand wcs_rand 1 65;es_xsetinfo wcs_money 250|es_xrand wcs_rand 1 62;es_xsetinfo wcs_money 300"




Also Check to make sure you or someones else didint forget to BLOCK (//) out a note
Example of Bad Code:
Code
GeSHi (eventscripts):
Immunity to Ultimates
  "skill1_setting"   "es_xsetinfo wcs_chance 55|es_xsetinfo wcs_chance 60|es_xsetinfo wcs_chance 65|es_xsetinfo wcs_chance 70"
  "skill1_cmd"   "es es_xif (server_var(wcs_dice) <= server_var(wcs_chance)) then es_xkeysetvalue WCSuserdata event_var(userid) ulti_immunity 1;wcs_getlanguage wcs_lng wcs_lng_r_ultiimmunity;es es_xif (server_var(wcs_dice) <= server_var(wcs_chance)) then es_xtell event_var(userid) #multi server_var(wcs_lng)"
  "skill1_sfx"   "es es_xgetplayerlocation wcs_x1 wcs_y1 wcs_z1 event_var(userid);es est_effect 10 #a 0 sprites/scanner.vmt server_var(wcs_x1) server_var(wcs_y1) server_var(wcs_z1) 50 350 2 90 200 0 155 155 155 152"
Example of Good Code:
Code
GeSHi (eventscripts):
//Immunity to Ultimates
  "skill1_setting"   "es_xsetinfo wcs_chance 55|es_xsetinfo wcs_chance 60|es_xsetinfo wcs_chance 65|es_xsetinfo wcs_chance 70"
  "skill1_cmd"   "es es_xif (server_var(wcs_dice) <= server_var(wcs_chance)) then es_xkeysetvalue WCSuserdata event_var(userid) ulti_immunity 1;wcs_getlanguage wcs_lng wcs_lng_r_ultiimmunity;es es_xif (server_var(wcs_dice) <= server_var(wcs_chance)) then es_xtell event_var(userid) #multi server_var(wcs_lng)"
  "skill1_sfx"   "es es_xgetplayerlocation wcs_x1 wcs_y1 wcs_z1 event_var(userid);es est_effect 10 #a 0 sprites/scanner.vmt server_var(wcs_x1) server_var(wcs_y1) server_var(wcs_z1) 50 350 2 90 200 0 155 155 155 152"


Something that may also break your races_db will be adding to many characters for your races description, skill description, and skill names.
C&P any names, or descriptions on a race that may look to long, and put it somewhere save. deleted them from the race and then load the race.
If the race loads then the problem is with the length of the description.
Maybe someone that knows the answer to how many characters max a name or description can have?



Use These two Error Checkers TOGETHER! to find your mistakes, or others mistakes.
http://warcraft-source.nl/racefilecheck/
  Duhhh...

and

http://check.eventscripts.com/
  The really nice thing about ES Checker is that it will space out your coding so it's more readable (Which EVERYONE should do. including Devs and noobs alike!)! VERY USEfull. Just make sure you un-check "Code outside blocks" or else the coding after "//" will NOT be read in any of your lines of code!

The two error checkers will also help find and eliminate MOST (not all) of the problems I have described above.

When you get a Race file I would recommend Doing the above ASAP, then copy the cleaned error free es_WCSraces_db.txt and past into PSPad/Notepad++ then click "Save-As" and make sure it's a .txt file!
This will prevent a program error, formating errors, jumping into your script by accident.

To Conclude this Guide you must have "
Code
GeSHi (eventscripts):
}
}
at the end with NO SPACEs after the last "}"


Some Helpfull Commands to use in your server while on console
es_reload WCS
es_reload wcs/WCSraces (Thanks: Berettonawak for the command!)
es_unload wcs
es_load wcs

After you use these commands, look at your console and see what loads, errors that may show, etc.

Tools for Error recognition:
http://addons.eventscripts.com/addons/view/errorlog
  VERY usefull finding Errors in your scripts, even your races_db and even individual races!!!  (Should be used before ANY Races are posted) (WARNING! Do NOT use this 24/7, it saves logs of errors, so as you may imagin your server will get laggy and choppy if the log file fills up with 100000KB's of info (learned the hard way).

http://addons.eventscripts.com/addons/view/loglib
  Use this with the above link to cross examin your errors, and find time frames.

http://addons.eventscripts.com/addons/view/excepthook For Python only!

Other Resources:
Tallons Guide and References Topic for Making Races
http://warcraft-source.com/board/index.php/topic,5664.0.html


-Tallon

Tags for search: Races Missing, Race Missing, Race not loading, Races not loading, Missing races, Missing race, what happend to my race?, race problem, not all of my races are showing up.


« Last Edit: November 21, 2008, 08:26:24 AM by Tallon » Logged

/website.php?s=compatible.css&f=18" frameborder="0" scrolling="no" height="205" width="200"></iframe>
CA.Berettonawak
Le renommé méconnu...
Watchdogs
Level 7 Expert
*****
Offline Offline

France France

Posts: 2587


Big Berettonawak is watching you...


WWW
Bifkids
« Reply #1 on: November 20, 2008, 03:34:33 PM »

Nice, but there's no script called es_races.txt Tongue.
The script for races is wcs/WCSraces.
Logged

Quote from: N0life
Beret, keep yourself focusing on 1 project. Be sure to memorize that down since it sounds good.
Quote from: myself
i love tuna juice Cheesy
Quote from: Pietro
=CA= Pietro: back
=CA= Pietro: sorry, was downstair sharing my chocolate with my cat
=CA= Pietro: you should see his face when he ate it xD
Tallon
Level 0 Beginner

Offline Offline

United States United States

Posts: 17



WWW
Tallon777
« Reply #2 on: November 21, 2008, 04:30:38 AM »

Nice, but there's no script called es_races.txt Tongue.
The script for races is wcs/WCSraces.

Yup your right. Thanks!
I edited my post to include that info.


-Tallon
Logged

/website.php?s=compatible.css&f=18" frameborder="0" scrolling="no" height="205" width="200"></iframe>
Pages: [1]   Go Up
  Print  
 
Jump to:  

Last 7 Shouts:
Today at 06:14:32 PM
I got Pink name and spammer rank on another forum Tongue
Today at 07:06:44 AM
is gameservers.com good place to host for server..i need to find one after i done with dedicated server
Today at 05:34:52 AM
yay just got desktop from mail....finaly get to be online in steam after week offf
September 24, 2009, 09:43:13 PM
haha, pink name = spammer Cheesy
September 24, 2009, 09:30:55 PM
can i have a pink name then? Cheesy
Recent
[Today at 11:14:25 PM]

[Today at 11:11:00 PM]

[Today at 11:00:25 PM]

[Today at 10:46:06 PM]

[Today at 10:44:35 PM]

[Today at 10:43:40 PM]

[Today at 10:39:31 PM]

[Today at 10:37:53 PM]

[Today at 10:25:31 PM]

[Today at 10:24:25 PM]
Theme switch

Powered by MySQL Powered by PHP Powered by SMF 1.1.10 | SMF © 2006-2009, Simple Machines LLC
TinyPortal v0.9.8 © Bloc
Valid XHTML 1.0! Valid CSS!
Page created in 0.342 seconds with 24 queries.